I am creating a Windows Phone 8.1 app that reads a file (which has GPS points, in each point Latitude and longitude fields) for every point, it is because it is displayed on the map coordinates, with a little push pin icon on the basis of the coordinate of the above file. Is there any way I can apply a click event to the push pin element and use it for example to display a second window where the user can change / show specific point / pushpin information (latitude or longitude) is? This is for reading and displaying on my map, and it works fine:
information: notes
is public supervision & lt; Point & gt; Notes;
Protected async override was navigated to zero (Navigation Event ARG E) {Bull exists; // It is used to check whether the JSON file exists / get the current position and set the map to point to Geoposition position = app.DataModel.GetCurrentPosition () wait; Wait for MyMap. Triteteviewsink (status coordinate page, 16d); MySlider.Value = MyMap.ZoomLevel; // Set it from previous line to 16D = App.DataModel.FileExistsAsync () wait; If (exist == true) {// file and load point view in App.DataModel.ReadFile (); // Put points on the map - a little map mark foreach (var point in App.DataModel.notes) {MapIcon myMapIcon = New MapIcon (); MyMapIcon.Location = New Geopoint (new BasicGeoposition () (latitude = dot.lititid, longitude = point.logo,}); MyMapIcon.NormalizedAnchorPoint = new point (0.5, 1.0); MyMap.MapElements.Add (myMapIcon);}} }}
You have not applied, No. You must MyMap.MapElements Instead of using .add (myMapIcon), XAML-based pushpins must be added to the map using
If you want end-user events Like MyMap.Children.Add (myXamlControl)
.
Edit: B here How to set up points and anchors for the XAML control:
MyMap.SetLocation (myXamlControl, myPoint); MyMap.SetNormalizedAnchorPoint (myXamlControl, new point (0.5, 0.5)) ;
Comments
Post a Comment