Click here to Skip to main content
15,901,035 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
Hi,
I have a problem with integrating Bing Maps.
The issue is,I compiled the project in this article

Microsoft VEMap Using Pure Javascript[^]

Because it is the project that I want exactly,I can put pushpin but can't drag it to near place. I looked from bingmapsportal SDK but it didn't work.
Thank you very much.
Posted
Updated 26-Jun-12 9:18am
v3
Comments
nazanozcelik 26-Jun-12 8:41am    
I am sorry that I asked the same question for two times,I deleted the other one,again sorry.

If you have issues with code that you obtained from CodeProject articles then use the forum at the end of the article to communicate with the author.
 
Share this answer
 
Hi,
I didn't look code but may be you are not using draggable property of pushpin like

_vpushPin.Draggable = true;

For more help, please ask me.
 
Share this answer
 
Comments
nazanozcelik 27-Jun-12 3:45am    
After compiling the code there is a bing map and textbox and button.For example you write Chicago in textBox,click button and it puts a pushpin to the place.But you can't drag that pushpin near place to Chicago,because it would be necessary for some conditions.I tried vpushPin.Draggable = true; and also other codes about draggable pushpin but all the time it gives me the same error msg that GetMap() isn't definied,although there is a function about that.
Thank you for answering.
Sorry I didn't have visual studio,but I look the page GeoCode.htm which have all the contents as you told.If I am right then in function GeocodeCallback you have to add one line

XML
var bestPlace = places[0];

          // Add pushpin to the *best* place
          var location = bestPlace.LatLong;

          var newShape = new VEShape(VEShapeType.Pushpin, location);
          newShape.Draggable = true; //new line
          var desc = "Latitude: " + location.Latitude + "<br>Longitude:" + location.Longitude;
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900