Display KMZ loaded file is not the same as original file in Google Map API v3

302 views Asked by At

I have loaded a KMZ file in Google Map API v3 which has detail polygons but the system doesn't show detail polygons and just display one polygon.

Original KMZ file in Google Earth:

Original file in Google Earth

Displayed KMZ file in Google Map API v3:

Original file in Google Map

KMZ File

Does anybody know how can I solve this problem?

Thanks in advance!

1

There are 1 answers

1
geocodezip On

All your polygons have the same winding direction.

http://www.geocodezip.com/geoxml3_test/v3_geoxml3_kmztest_winding_linktoB.html?filename=http://www.geocodezip.com/geoxml3_test/Tehran_Indoor.kmz

To make holes in a polygon the innerBoundaryIs needs to wind in the opposite direction of the outerBoundaryIs that contains it.

Google map displaying your KML with reversed innerBoundaryIs

geoxml3 displaying the KMZ (with computed winding direction)