0

I wanted to display End Label in MapsDirectionsTask . I am using the below snippet

MapsDirectionsTask directionToATM = new MapsDirectionsTask();
LabeledMapLocation endLabelOnMap = new LabeledMapLocation("Test",
new GeoCoordinate(13.0022,077.5980));
directionToATM.End=endLabelOnMap;
directionToATM.Show();

But The End Label which is marked as "Test" is not populating in launcher.Also I tried to set the End label explicitly.

directionToATM.End.Label="Test";

But it is throwing exception of

"attempted to read write protected memory. this is often an indication that other memory is corrupt"

Subhamoy
  • 116
  • 5
  • 21

1 Answers1

0

I think you're getting confused over what the LabeledMapLocation uses the specified label for.

The value you give it will not be shown on the label displayed on the map but will be used in place of the location in the locations/search entry box

Search showing name of end location

and also in the list of directions

Directions including the name of the end location

It is not shown on the pin on the map.

Yes the name could be considered misleading.

Note. Above images from the 8.0 WVGA 152 emulator.

Matt Lacey
  • 65,560
  • 11
  • 91
  • 143