简体   繁体   English

将KML叠加层转换为Google Maps的PNG叠加层

[英]Convert KML overlay to PNG overlay for Google Maps

I have a large KML file with a lot of polygons and if I try to load it into my google maps application, with the JS library geoXML3, the javascript stops with timeouts. 我有一个很大的KML文件,其中包含许多多边形,如果尝试使用JS库geoXML3将其加载到我的Google Maps应用程序中,则JavaScript会因超时而停止。 With small KMLs it's not a problem. 对于小型KML,这不是问题。

Now, my idea is to convert the KML file to a PNG image and give this image as an OverlayLayer to the google maps api. 现在,我的想法是将KML文件转换为PNG图像,并将该图像作为OverlayLayer的形式提供给Google Maps API。 Possibly the converter should support the google maps zoomlevel to create adaptet images. 转换器可能应该支持google maps zoomlevel来创建适应图像。

Unfortunately I have no idea how to realize this conversion. 不幸的是,我不知道如何实现这种转换。 Are there any existing solutions like php scripts or anything else? 是否有任何现有的解决方案,例如php脚本或其他?

Kind Regards 亲切的问候

I have converted a KML file into a PNG layer using the following method: 我已使用以下方法将KML文件转换为PNG图层:

  1. Convert the KML file to an Illustrator file using the method on this page http://dodona.wordpress.com/2010/03/24/how-do-i-open-my-google-maps-route-in-adobe-illustrator/ 使用此页面上的方法将KML文件转换为Illustrator文件http://dodona.wordpress.com/2010/03/24/how-do-i-open-my-google-maps-route-in-adobe-插画/
  2. Convert the Illustrator file to a PNG using Photoshop 使用Photoshop将Illustrator文件转换为PNG
  3. Create a PNG layer from the PNG file using MapTiler ( http://www.maptiler.org/ ) 使用MapTiler( http://www.maptiler.org/ )从PNG文件创建PNG图层

I now have a PNG map tile layer I can use in Google Maps or Bing Maps. 我现在有了一个PNG地图图块图层,可以在Google Maps或Bing Maps中使用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM