How to Display Custom KML Placemark Icon using Image from Local Disk or Network Drive -
does know how display custom kml placemark icon using image local disk or network drive.
i tried , not working:
<?xml version="1.0" encoding="utf-8"?> <kml xmlns="http://www.opengis.net/kml/2.2"> <style id="icon"> <iconstyle> <icon> <href>c:\etnasss.jpg</href> </icon> </iconstyle> </style> <placemark> <name>simple placemark</name> <description>attached ground. intelligently places @ height of underlying terrain.</description> <styleurl>#icon</styleurl> <point> <coordinates>-122.0822035425683,37.42228990140251,0</coordinates> </point> </placemark> </kml>
thanks
the <href>
element in kml takes url not windows file path. url can absolute or relative location.
to working suggest first move kml file , image same folder refer image filename.
<style id="icon"> <iconstyle> <icon> <href>etnasss.jpg</href> </icon> </iconstyle> </style>
source: https://developers.google.com/kml/documentation/kmlreference#href
next refer image absolute location (e.g. file:///c:/etnasss.jpg) google earth has security policy regarding access local files on file scheme outside context of kml file. you'd have allow access local files not recommended.
alternatively create kmz file (aka zip file) , include image within kmz archive file , reference in kml file.
icons kml google-earth
No comments:
Post a Comment