locked
Map controls RRS feed

  • Question

  • I am developing windows 10 application in that I am trying to get the push pin in map control when I click the near by hospital item for that I am using the below code but when I am click the item its not display the push pin for this I am getting the hospital longitude and latitude is their any solution for this. and at present I am displaying the my location in map and I want to display the near by hospital location.

    varselecteditem = nearbyhospitalslist.SelectedItem asGprsLocation.Result;

    MapControlmap = newMapControl();

    doublelat1 = selecteditem.geometry.location.lat; // selected latitude

    doublelng1 = selecteditem.geometry.location.lng; // selected longitude

    map.Center = newGeopoint(newBasicGeoposition()

    {

    Latitude = lat1,

    Longitude = lng1,

    });

    myMap.MapElements.Clear();

    myMap.Children.Add(map);

    MapIconmapIcon1 = newMapIcon();

    mapIcon1.Location = myMap.Center;

    mapIcon1.NormalizedAnchorPoint = newPoint(0.5, 1.0);

    mapIcon1.Image = mapIconStreamReference;

    mapIcon1.Title=selecteditem.name;

    mapIcon1.ZIndex = 0;

    myMap.MapElements.Add(mapIcon1);

    Regards

    B.sateesh

     
    Wednesday, October 14, 2015 6:48 AM

Answers