Whole world KML with innerboundaries displays wierd in google maps -
all!
i have kml file looks next:
<?xml version="1.0" encoding="utf-8"?> <kml xmlns="http://www.opengis.net/kml/2.2"> <document> <name>kml file polygon bird species range</name> <description>source various books , websites</description> <style id="rangecolour"> <linestyle><color>660000ff</color><width>1</width></linestyle> <polystyle><color>660000ff</color></polystyle> </style> <style id="linecolour"> <linestyle><color>660000ff</color><width>3</width></linestyle> </style> <placemark><name>distribution/range</name> <description></description> <styleurl>#rangecolour</styleurl> <polygon> <tessellate>1</tessellate> <altitudemode>clamptoground</altitudemode> <outerboundaryis> <linearring> <coordinates> -180.0,180.0,0.0 -180.0,-180.0,0.0 180.0,-180.0,0.0 180.0,180.0,0.0 -180.0,180.0,0.0 </coordinates> </linearring> </outerboundaryis> <innerboundaryis> <linearring> <coordinates> 153.056374,-27.500658,0.0 153.056374,-27.524105,0.0 153.093109,-27.524105,0.0 153.093109,-27.500658,0.0 153.056374,-27.500658,0.0 </coordinates> </linearring> </innerboundaryis> </polygon> </placemark> </document> </kml>
my intention "hole" inside entire world shadded world outside boundaries (this example), but, reason don't know, in google earth works fine, in google maps (api v3, @ least... 1 i'm using "google.maps.kmllayer(url.kml)"...) not.
does know why?
thank in advance!
the outer boundary is:
<coordinates> -180.0,180.0,0.0 -180.0,-180.0,0.0 180.0,-180.0,0.0 180.0,180.0,0.0 -180.0,180.0,0.0 </coordinates>
which narrow square (between -180 , +180)
the kml displayed below uses polygon (the whole world small hole):
<placemark><name>distribution/range</name> <description></description> <styleurl>#rangecolour</styleurl> <polygon> <tessellate>1</tessellate> <altitudemode>clamptoground</altitudemode> <outerboundaryis> <linearring> <coordinates> 180,85 90,85 0,85 -90,85 -180,85 -180,0 -180,-85 -90,-85 0,-85 90,-85 180,-85 180,0 180,85 </coordinates> </linearring> </outerboundaryis> <innerboundaryis> <linearring> <coordinates> 153.056374,-27.500658,0.0 153.093109,-27.500658,0.0 153.093109,-27.524105,0.0 153.056374,-27.524105,0.0 153.056374,-27.500658,0.0 </coordinates> </linearring> </innerboundaryis> </polygon> </placemark>
this works me geoxml3, doesn't work kmllayer.
i don't know why, google maps kml parser , kmllayer have pretty been broken way.
Comments
Post a Comment