I am using javascript to call google map using javascript as given below throug xslt. It gives error of Gmap undefined.

<?xml version="1.0"?>

//


Comments

rupak.wahi’s picture

Assigned: Unassigned » rupak.wahi

<?xml version="1.0"?>

var sc = document.createElement('script'); sc.setAttribute('src', 'http://www.google.com/jsapi?key=ABQIAAAAt9dZ24lueXuymndHYfulohRWv2UtVHY4dZ2_iKAVUvBhqt63lBRhWANsy1-sL4iWUBNaW6jj9V9cfA'); sc.setAttribute('type', 'text/javascript'); document.getElementsByTagName('head')[0].appendChild(sc); var map = new GMap2(document.getElementById("map_canvas")); map.addControl(new GSmallMapControl()); map.addControl(new GMapTypeControl()); map.setCenter(new GLatLng(51.516282,-0.095418), 10);


rupak.wahi’s picture

Assigned: rupak.wahi » Unassigned
dman’s picture

Priority: Critical » Normal
Status: Active » Postponed (maintainer needs more info)

Critical indicates the status of the module - not of your own requirements.
If the javascript is giving you an error, I'm guessing you are not including the gmap library - which has to be available for stuff to work.
That snippet looks a little worrying though. It's clearly not xml.

avpaderno’s picture

I think rupak.wahi reported the JavaScript code he is using, and that causes him the error he described. It's not clear why that declaration tag has been written.

avpaderno’s picture

The code seems similar to the code he attached to a different report he opened here (see the attachment). In that case, he tried to write the content of the XSLT file, but it has been filtered out from Drupal.

avpaderno’s picture

Issue summary: View changes
Status: Postponed (maintainer needs more info) » Closed (outdated)

I am closing this issue, which is for a not supported Drupal version.