Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Overlaying Multiple KML files on google Map displayed in the browser

Tags:

file

kml

Need to know the procedure for overlaying multiple KML files on a single Google Map that is displayed in the browser. The KML files intended for this can point to different locations. Ex:KML1 for North America & KML2 for Asia. Could anyone help me out in this.

like image 751
Jayasudha Avatar asked Dec 09 '25 23:12

Jayasudha


1 Answers

I think you are looking for this:

http://code.google.com/apis/kml/documentation/kml_tut.html#network_links

example:

<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2">
  <Folder>
    <name>Network Links</name>
    <visibility>0</visibility>
    <open>0</open>
    <description>Network link example 1</description>
    <NetworkLink>
      <name>Random Placemark</name>
      <visibility>0</visibility>
      <open>0</open>
      <description>A simple server-side script that generates a new random
        placemark on each call</description>
      <refreshVisibility>0</refreshVisibility>
      <flyToView>0</flyToView>
      <Link>
        <href>http://yourserver.com/map1.kml</href>
      </Link>
    </NetworkLink>

    <NetworkLink>
      <name>Random Placemark</name>
      <visibility>0</visibility>
      <open>0</open>
      <description>A simple server-side script that generates a new random
        placemark on each call</description>
      <refreshVisibility>0</refreshVisibility>
      <flyToView>0</flyToView>
      <Link>
        <href>http://yourserver.com/map2.kml</href>
      </Link>
    </NetworkLink>
  </Folder>
</kml>
like image 115
Bill Yang Avatar answered Dec 12 '25 22:12

Bill Yang



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!