Question

How to color each polygon separately in a kml file using Attribute Filter


Badge +1

Hi,

I have a kml file that is created from a MapInfo Tab file that has 9 polygons, the polygons are all the one colour and will change to another colour if you hover over it. Now I want to remove the old outline colour and assign a different colour to each polygon using the Asset_Mgr_Region field to filter by, but still retain the highlight on hover.

 

I am not sure where to place the Attribute Filter to achieve what I want, how do I use this? I have attached my workspace.

 

Thanks


4 replies

Userlevel 2
Badge +19

Hi there,

Thanks for uploading the fmw. You can also run the workspace and then go to File save as Template. Include the feature cache when saving the fmwt. Uploading the template allows for better testing/debugging.

 

Are you writing this TAB->KML to a shapefile? If so, could it be as simple as opening the .shp in QGIS or ESRI and changing the symbology based on unique field = Asset_Mgr_Region specifying different colors for each polygon.

Badge +1

Hi,

I have attached the template.

I am only trying to write this from TAB to KML file. I did manage to change each region colour to what I set in the KML Styler but then I couldn't get the highlight on hover part to work.

Userlevel 2
Badge +19

OK I think maybe you are after something like the attached.

 

I also found another article that might help https://community.safe.com/s/question/0D54Q00008B1GT0SAN/can-you-highlight-a-polygon-in-a-kml-file-when-you-hover-over-it

Badge +1

OK I think maybe you are after something like the attached.

 

I also found another article that might help https://community.safe.com/s/question/0D54Q00008B1GT0SAN/can-you-highlight-a-polygon-in-a-kml-file-when-you-hover-over-it

Yes, that looks like what I am after, will give that a go. Thanks very much.

Reply