Is there any way to allow the user to reposition a marker on the map component? My app is getting the current location and displaying it for the user. The user should then be allowed to alter the position if they're not happy with the presented location. Ideally I'd like them to be able to drag the automatically placed marker to a new location.
That's spot on, I've now got the marked moving to match the new selection. Thanks for that, the map control is now doing exactly what I need
Hello Kevin,
In order to get the latitude and longitude when clicking the GeographicMap in the Ignite UI for Blazor toolset, I would recommend using the PlotAreaClicked event of the control.
The event arguments of this event can net you the pixel location that you have clicked on the GeographicMap, which you can then pass to the GetGeographicPoint method to get the latitude and longitude point. Below is an example event handler for the PlotAreaClicked event:
public void OnPlotAreaClicked(PlotAreaMouseButtonEventArgs args) { Point point = args.ChartPosition; var x = GeoMapRef.GetGeographicPoint(point); Console.WriteLine("Lat: " + x.Y + ", Long: " + x.X); }
Please let me know if you have any other questions or concerns on this matter.
Sadly this one's a bit of a deal breaker. My use case here is that the user's device has returned a location which we display on the map control, but we then need to allow the user to adjust the location (they might be creating a report after the event, in which case their current location is irrelevant). Do you expose any event on clicking on the control that would return the clicked on latitude/longitude?
I have been investigating into your requirement to drag and drop markers in the GeographicMap component in the Ignite UI for Blazor toolset, and with the current implementation of the GeographicMap and GeographicSymbolSeries, the map or symbols do not expose a way to drag and drop them, and as such are completely dependent on the Latitude and Longitude member paths that you assign to them at this time.
If you would like to see the ability to drag and drop the markers on the GeographicMap component, I would recommend suggesting a new product idea for this at our Ignite UI for Blazor Ideas Site, here. This will place you in direct communication with our product management teams who plan and prioritize upcoming features and development based on community and user feedback.