带有多边形的kmllayer隐藏地图

时间:2015-06-08 23:13:37

标签: javascript google-maps google-maps-api-3 kml

基于Google Map's KML Layers我有一个kmllayer来加载多边形 http://www.vis-it.com.ar/www/barrios08062015081002PM.kml

地图加载正常,但加载klmlayer时隐藏地图,所有map_canvas都显示为蓝色,多边形从其原始位置旋转。每个相同的坐标一次显示OK一个多边形,但kml表现那样。 我的kml是从kmlreference文档格式化的,我尝试使用Button.Height标签,但结果是一样的。

1 个答案:

答案 0 :(得分:0)

你的坐标在KML中向后。

KML coordinates are longitude,latitude[,altitude].

your kml on a map

它的摘录:

<Placemark>
<name>64 VIVIENDAS</name>
<visibility>0</visibility>
<Polygon>
<extrude>1</extrude>
<innerBoundaryIs>
<LinearRing>
<coordinates>
-29.766407681574762,-62.047154903411865,0
-29.76759976891944,-62.04902172088623,0
-29.769052606190985,-62.047669887542725,0
-29.766407681574762,-62.047154903411865,0
</coordinates>
</LinearRing>
</innerBoundaryIs>
</Polygon>
</Placemark>

fixed (reversed coordinates)

它的摘录:

<Placemark>
<name>64 VIVIENDAS</name>
<visibility>0</visibility>
<Polygon>
<extrude>1</extrude>
<innerBoundaryIs>
<LinearRing>
<coordinates>
-62.047154903411865,-29.766407681574762,0
-62.04902172088623,-29.76759976891944,0
-62.047669887542725,-29.769052606190985,0
-62.047154903411865,-29.766407681574762,0
</coordinates>
</LinearRing>
</innerBoundaryIs>
</Polygon>
</Placemark>