c# - How to drag a pushpin and get location using Bing Maps in Windows 8.1? -



c# - How to drag a pushpin and get location using Bing Maps in Windows 8.1? -

i working on bing maps in windows 8.1 app in there requirement drag pushpin , when dropped location. pushpin using 3rd party command found after little search on google. new windows 8.1 development, not much aware touch events , how handle drag events. can suggest me sample code how can this.

please help.

also, when displaying location facing zoom in , out issue, pushpin moves away location. here code displaying location

map map = frameworkelement map; map.credentials = "my bing maps key"; //map. = mapcartographicmode.road; map.zoomlevel = 15; bing.maps.location location = new bing.maps.location() { latitude = convert.todouble(value.gettype().getruntimeproperty("latitude").getvalue(value, null)), longitude = convert.todouble(value.gettype().getruntimeproperty("longitude").getvalue(value, null)) }; maplayer layer = new maplayer(); map.children.add(layer); mapcontrol.pushpin pushpinpin = new mapcontrol.pushpin(); pushpin.background = new solidcolorbrush(colors.red); pushpin.margin = new thickness(-12, -12, 0, 0); textblock nametxtblk = new textblock() { text = value.council_name, width = 250, textwrapping = textwrapping.wrap, }; pushpin.content = nametxtblk; maplayer.setposition(pushpin, location); //maplayer.setpositionanchor(pushpin, new point(width/2, height/2)); layer.children.add(pushpin); map.setview(location); break;

here, mapcontrol.pushpin 3rd party control, using display location.

update

i adding pushpin image below. please suggest.

i have code sample of how create draggable pushpins in bing maps on windows 8.1 here: https://code.msdn.microsoft.com/draggable-pushpin-in-bing-939eaaa5

c# windows-8.1 bing-maps

Comments

Popular posts from this blog

java - How to set log4j.defaultInitOverride property to false in jboss server 6 -

c - GStreamer 1.0 1.4.5 RTSP Example Server sends 503 Service unavailable -

Using ajax with sonata admin list view pagination -