Welcome to MapForums!

Register, sign in, or use Facebook Connect above to join in and participate in the forum.

When you are signed in, this message, the ads in this row, and the red-underlined link ads all go away.

Subscribe to receive our newsletter.
Subscribe Unsubscribe
Results 1 to 3 of 3

Pin on Micrsoft Virtual Earth is off, need to change coordinates

This is a discussion on Pin on Micrsoft Virtual Earth is off, need to change coordinates within the General Chat forums, part of the Map Forums category; bare with me, I'm not a hardcore developer, more of a front-end web designer with prior knowledge of custom API ...

  1. #1
    domerdel is offline Junior Member White Belt
    Join Date
    Oct 2008
    Posts
    2

    Question Pin on Micrsoft Virtual Earth is off, need to change coordinates

    bare with me, I'm not a hardcore developer, more of a front-end web designer with prior knowledge of custom API google map code working with latitude and longitude gps coordinates. Jumping on after another developer created this code, so i'm trying to make educational guesses.

    Basically, the var is pulling it by address. When you zoom in, it's about 100-150 yards off, it's not their building the pin is on. So, I'm assuming that I'll have to determine it by lat/long gps coordinates, just don't know how.

    Here's the code:

    Code:
      function AddPin4()
        {
          var address = "2775 N. Front St. Woodburn, OR, 97071";
          map.Find(null,address, null, null, null, null, null, null, null, false, findCallback4);
        }
      function findCallback4(layer, resultsArray, places, hasMore, veErrorMessage)
        {
          var info = "Grating Pacific";
          var pin = new VEShape(VEShapeType.Pushpin, places[0].LatLong);
          //pin.SetCustomIcon(icon);
          map.ClearInfoBoxStyles();
          pin.SetTitle("<h3>Grating Pacific</h3>");
          pin.SetDescription("2775 N. Front St.<br />Woodburn, OR 97071<br />(800) 942-4041<br />(503) 980-2060<br />FAX (503) 980-2068<br />sample@email.com");
          map.AddShape(pin);
          AddPin5();
        }
    Here is the google maps code. this has the custom GPS coordinates in it:

    Code:
    <iframe width="425" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/maps?f=q&amp;hl=en&amp;geocode=&amp;q=2775+N.+Front+St.+Woodburn,+OR,+97071&amp;sll=40.551953,-122.337798&amp;sspn=0.012114,0.019312&amp;ie=UTF8&amp;t=h&amp;s=AARTsJqAbkWmH4avpPCjfg1tyN17fbxxOQ&amp;ll=45.170359,-122.831526&amp;spn=0.021179,0.036478&amp;z=14&amp;iwloc=addr&amp;output=embed"></iframe><br /><small><a href="http://maps.google.com/maps?f=q&amp;hl=en&amp;geocode=&amp;q=2775+N.+Front+St.+Woodburn,+OR,+97071&amp;sll=40.551953,-122.337798&amp;sspn=0.012114,0.019312&amp;ie=UTF8&amp;t=h&amp;ll=45.170359,-122.831526&amp;spn=0.021179,0.036478&amp;z=14&amp;iwloc=addr&amp;source=embed" style="color:#0000FF;text-align:left">View Larger Map</a></small>
    Last edited by domerdel; 10-13-2008 at 06:30 PM.

  2. #2
    lfdmike's Avatar
    lfdmike is offline Member Green Belt
    Join Date
    May 2004
    Posts
    56
    Blog Entries
    7

    Re: Pin on Micrsoft Virtual Earth is off, need to change coordinates

    Documentation on how to use Lat/Long:
    VE SDK

  3. #3
    domerdel is offline Junior Member White Belt
    Join Date
    Oct 2008
    Posts
    2

    Question Re: Pin on Micrsoft Virtual Earth is off, need to change coordinates

    I tried that. It still doesn't work. Perhaps someone can help with a correction to my code.

    Code:
    function AddPin4()
        {
          var address = "2775 N. Front St. Woodburn, OR, 97071";
          map.Find(null,address, null, null, null, null, null, null, null, false, findCallback4);
          
        }
      function findCallback4(layer, resultsArray, places, hasMore, veErrorMessage)
        {
          var info = "Grating Pacific";
          var pin = new VEShape(VEShapeType.Pushpin, new VELatLong(45.161101, -122.835689);
          //pin.SetCustomIcon(icon);
          map.ClearInfoBoxStyles();
          pin.SetTitle("<h3>Grating Pacific</h3>");
          pin.SetDescription("2775 N. Front St.<br />Woodburn, OR 97071<br />(800) 942-4041<br />(503) 980-2060<br />FAX (503) 980-2068<br />sales@gratingpacific.com");
          map.AddShape(pin);
          AddPin5();
        }

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Change Virtual Earth Background Color
    By VirtualEarth MSDN Blog in forum Bing Maps Blogs & Tweets
    Replies: 0
    Last Post: 07-09-2008, 10:11 PM
  2. Replies: 0
    Last Post: 05-11-2008, 02:50 PM
  3. Virtual Earth & SQL Server 2008 - Part 3: Getting Started with Virtual Earth
    By Johannes Kebeck's Blog in forum Bing Maps Blogs & Tweets
    Replies: 0
    Last Post: 03-02-2008, 01:40 PM
  4. Virtual Earth API: How to Create a Full-Screen Virtual Earth Mashup
    By Keith Kinnan's Weblog in forum Bing Maps Blogs & Tweets
    Replies: 0
    Last Post: 01-04-2008, 09:27 AM
  5. Virtual Earth News from GEOINT 2007: Virtual Earth Appliance
    By VE For Government in forum Bing Maps Blogs & Tweets
    Replies: 0
    Last Post: 10-24-2007, 12:10 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132