Google map using XSLT

rupak.wahi - February 19, 2009 - 12:46
Project:XML Content
Version:6.x-1.x-dev
Component:Code
Category:support request
Priority:normal
Assigned:Unassigned
Status:postponed (maintainer needs more info)
Description

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"?>

//

#1

rupak.wahi - February 19, 2009 - 12:50
Assigned to:Anonymous» 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);

#2

rupak.wahi - February 19, 2009 - 12:58
Assigned to:rupak.wahi» Anonymous

#3

dman - March 1, 2009 - 22:30
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.

#4

kiamlaluno - March 2, 2009 - 18:52

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.

#5

kiamlaluno - March 2, 2009 - 18:57

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.

 
 

Drupal is a registered trademark of Dries Buytaert.