Adding a kml layer

Permalink Browser Info Environment
I am looking to add a kml layer to the page mapper map. I just need the kml layer to appear on the maps, I don't need to edit or acces it through concrete5 in any way. I know how to override the google_map_public.php file, but what I can't figure out is where and how in that file to add the new layer.

I am using this code for the new layer:

var vlawmoLayer = new google.maps.KmlLayer({
    url: 'http://www.my-kml-url.com'
  });
  vlawmoLayer.setMap(map);
}


but no matter where I add that (after the var map line), it screws up the map initialization and result in a blank map. Any clues I can get are appreciated!

Type: Discussion
Status: New
kspitzley
View Replies:
kspitzley replied on at Permalink Reply
kspitzley
I guess just posting the question helped...I had an extra bracket at the end of the code. I placed

var layer = new google.maps.KmlLayer({
    url: 'http://www.my-kml-url.com'
  });
  layer.setMap(map);


right after line 35:

var map = new google.maps.Map(document.getElementById("map_canvas<?php   echo $id; ?>"), myOptions);

concrete5 Environment Information

Browser User-Agent String

Hide Post Content

This will replace the post content with the message: "Content has been removed by an Administrator"

Hide Content

Request Refund

You have not specified a license for this support ticket. You must have a valid license assigned to a support ticket to request a refund.