Add a marker dynamically by clicking on the map
Hello,
I am interested in using syncfusion_flutter_map in one of our projects. For this, it is essential that I can add a marker on the map by clicking on it and retrieve the latitude and longitude of the point. I am using Openstreetmap, is there a solution?
Thank you in advance for your help
SIGN IN To post a reply.
3 Replies
1 reply marked as answer
LR
Lakshmi Radha Krishnan
Syncfusion Team
June 25, 2021 02:17 PM UTC
Hi,
Greetings from Syncfusion support.
You can place the marker at the tapped position using the MapTileLayerController.pixelToLatLng method. We have attached code snippet for your reference, kindly let us know if you need further assistance with this.
Code snippet:
class _MarkerPageState extends State<MarkerPage> { |
Regards,
Lakshmi R.
Marked as answer
NC
Nathan Cortat
July 6, 2021 03:01 PM UTC
Hello,
Thank you very much Lakshmi,
I successfully get the position of a click on the map !
Have a nice day !
PG
Pon Geetha A J
Syncfusion Team
July 7, 2021 09:49 AM UTC
Hi Nathan,
We are glad to know that your issues is resolved.
Regards,
Geetha
SIGN IN To post a reply.
- 3 Replies
- 3 Participants
- Marked answer
-
NC Nathan Cortat
- Jun 25, 2021 12:01 PM UTC
- Jul 7, 2021 09:49 AM UTC