Pergunta

I have a kmz file that I have saved as kml to use in a google fusion table. I have been able to then display a map with each kml item on the map. However, I want the outer boundary of those kml files to be highlighted.

To give you an example, the kml is an outline of every zip code. In my table I have a field that states what region that kml is part of. I can have the user search for a region and it displays every zipcode as outlined by the kml. However, I don't want each individual item, I want a boundary around the group.

Is there any way to achieve this?

Foi útil?

Solução

the abstract answer is fairly simple: load the kml into an XML DOM, loop through all the location nodes, and track the smallest and largest latitudes and longitudes. You will then have a set of 4 latitiude/longitude points that would represent the "bounding box" of coordinates. Since there is no mention about the tools that you would like to use to do this in your question, I would need more information to help you further.

Outras dicas

A single Polygon shared a single style, so the only way to do this is to replicate the outerBoundary as a separate Polygon with a different style.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top