简体   繁体   中英

Convert a KML file to an image file using PHP or Javascript

I'm trying to convert a KML file with a lots of polygons into an image in order to put it into a PDF file with PHP. Is there any solution to achieve that ? I tried with Google Static Maps API but there are too much polygons. Thanks in advance.

It doesn't involve PHP, but you could load the KML file into Google Earth Pro, and use the "Save image" tool (or just a screenshot) to export an image version of the map with the KML polygons.

If you don't want the map as the background, you can overlay a large filled polygon behind your KML polygons to give them a solid background color (white or otherwise). May have to play with Draw Order settings in the KMLs to get them to overlay in the desired order.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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