So I am working on the map where I show different markers and I am trying to set a bool on the button click under set state and the map is not refreshing is there any way or alternate way to refresh?
I am able to have on click on the map but i want to refresh the map when button is pressed which is not working
Here is the code
How i set the marker
every thing is working but the map is not getting refresh when button clicked
Hi Neelay,
Greetings from Syncfusion.
We have validated your query and code snippet at our end, we are sorry that we were not able to understand what you are trying to achieve by analyzing your code snippets. In the first code snippet, you have changed the `blinkFunction` value in `setState` but we cannot suspect that where you have used that flag in the map widget and in what case you need to refresh the Map widget using that flag.
So, we request you to kindly revert us with more information in detail about your exact requirement along with screenshots or screen recording and also, if possible, provide us with a simple replication sample about your scenario so that it will help us assist you in a better way.
Regards,
Sriram Kiran
So in the marker widget I am setting which marker i will show
here is the code
when the 'function' is selected as a marker. I want to show icon or a blinking widget but when I try to refresh the widget which already has an icon it doses not update the marker build.
Hi Neelay,
Thanks for the revert. We have checked your requirement at our end, and we would like to let you know that if you need to add, remove, or update the marker in the Maps widget, then you must use MapShapeLayerController or MapTileLayerController based on the layer you have used in your widget.
We have created a simple sample in which we have rendered a few markers on the MapShapeLayer using markerBuilder and set the controller for the layer to update the marker using the updateMarker method on button click. We have attached the sample and also appended the user guide documentation for updating existing markers in the Map below for your reference.
https://help.syncfusion.com/flutter/maps/markers#updating-the-existing-markers
Please check and get back to us if you require further assistance on this.
Regards,
Sriram Kiran