Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Google Maps and KMZ files

New Here ,
Mar 22, 2010 Mar 22, 2010

Does anyone know how to get Coldfusion to display a KMZ layer on a google map? I have a google map that has multiple layers and it works great but we would like the map to display a KMZ file as a layer. The KMZ file is located on the root of the web directory.

!---Start of Map--->
   <script src=http://maps.google.com/maps?file=api&v=2&key=mykey
            type="text/javascript"></script>
            <script src="http://earthcode.com/downloads/gzoom.js" type="text/javascript"></script>
      <script src="http://gmaps-utility-library.googlecode.com/svn/trunk/markermanager/1.1/src/markermanager.js"></scri...>
         <script type="text/javascript">
    function initialize() {
    
   if (GBrowserIsCompatible()) {
 
  <!---Map 1--->
  var map1 = new GMap2(document.getElementById("map_canvas1"));
        map1.setCenter(new GLatLng(31.970804,-86.682129), 4);
  map1.setMapType(G_HYBRID_MAP);
  map1.setUIToDefault();

// Create a base icon for all of our markers that specifies the
        // shadow, icon dimensions, etc.
        var baseIcon = new GIcon(G_DEFAULT_ICON);
        baseIcon.shadow = "http://www.google.com/mapfiles/shadow50.png";
        baseIcon.iconSize = new GSize(20, 34);
        baseIcon.shadowSize = new GSize(37, 34);
        baseIcon.iconAnchor = new GPoint(9, 34);
        baseIcon.infoWindowAnchor = new GPoint(9, 2);

        // Creates a marker whose info window displays the letter corresponding
        // to the given index.
        function createMarker(point, title, contact, icao, iwwc, letter) {
          // Create a lettered icon for this point using our icon class
          var letteredIcon = new GIcon(baseIcon);
          letteredIcon.image = "http://www.google.com/mapfiles/marker"+letter+".png";

          // Set up our GMarkerOptions object
          markerOptions = { icon:letteredIcon, title:title };
          var marker = new GMarker(point, markerOptions);

          GEvent.addListener(marker, "click", function() {
            marker.openInfoWindowHtml("<u><b>" + title + "</b></u><br /><b>Phone:&nbsp</b>" + contact + "<br /><b>ICAO:&nbsp</b>" + icao + "&nbsp&nbsp&nbsp&nbsp&nbsp<B>IWWC:&nbsp</b>"+iwwc);
          });
          return marker;
        }
<!---/** OVERLAYS MAP 1**/--->

map1.addOverlay(createMarker(new GLatLng(41.939,-72.688), "Bradley International Airport", "DSN 220-2312", "KBDL", "CT3", "A"));

1.1K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Valorous Hero , Mar 22, 2010 Mar 22, 2010

ColdFusion is going to have nothing to do with KMZ and Google Maps.  Google Maps are a client technology that use JavaScript.  Have your CFML deliver the proper JavaScript that the Google Maps API is expecting inside of some relevant HTML and the browsers that can will display your desired map.

ColdFusion won't even know it has happend, it has moved on to another request.

Translate
Valorous Hero ,
Mar 22, 2010 Mar 22, 2010
LATEST

ColdFusion is going to have nothing to do with KMZ and Google Maps.  Google Maps are a client technology that use JavaScript.  Have your CFML deliver the proper JavaScript that the Google Maps API is expecting inside of some relevant HTML and the browsers that can will display your desired map.

ColdFusion won't even know it has happend, it has moved on to another request.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources