We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

MapPolygonLayer transparency on hover


I'm currently experiencing an issue with the `MapPolygonLayer`. In our use-case we wish to have a sublayer showing polygons over the map. The polygons show successfully but `onHover` the transparency we have set is overridden causing our map be hidden.

We wish to have the ability to show polygons and when the mouse triggers the hover action for our `Color` set to not change.

Are there any work arounds in the meantime and would it be possible to have the hover action optional?

Please refer to the video attached.



Attachment: hovertransparencymapissue_7d12d8fd.zip

1 Reply

SK Sriram Kiran Senthilkumar Syncfusion Team October 17, 2022 09:26 AM

Hi Will,

Greetings from Syncfusion.

We have checked your query, and we would like to let you know that you can customize the shape hover color in the maps widget by wrapping the SfMaps widget inside the SfMapsTheme and setting the shapeHoverColor for the SfMaps widget as per your requirement.

For your case, we suggest setting the shapeHoverColor to Colors.Transparent so that when hovering on the polygons, its transparency will not change. Please check the code snippet below for reference.


        data: SfMapsThemeData(

           shapeHoverColor: Colors.transparent,

           shapeHoverStrokeColor: Colors. transparent,


        child: SfMaps(

          layers: <MapLayer>[


              source: dataSource,




Also appended the user guide documentation for customizing the hover color in the maps below for your reference.


Please check and get back to us if you require further assistance.

Sriram Kiran

Live Chat Icon For mobile
Up arrow icon