// Load Google Maps Script and define functions
$output = '';
if ($this->mapsCount == 1) {
- $output .= '<script src="http://maps.google.com/maps?file=api&v=2&key=' . htmlspecialchars($this->apiKey) . '" type="text/javascript" />' . "\n";
+ $output .= '<script src="http://maps.google.com/maps?file=api&v=2&key=' . htmlspecialchars($this->apiKey) . '" type="text/javascript"></script>' . "\n";
$output .= WRGMAPJSFUNCTIONS;
}
// returns a string that creates a map object called 'map'
private function addMap($mapName) {
- return "\tmap = new GMap2(document.getElementById($mapName));\n" .
+ return "\tmap = new GMap2(document.getElementById(\"$mapName\"));\n" .
"\tmap.addControl(new GLargeMapControl());\n" .
"\tmap.addControl(new GMapTypeControl());\n" .
"\tmap.addControl(new GScaleControl());\n" .
// returns a string with a add marker javascript call
private function addJsMarker($latitude, $longitude, $pageTitle) {
- return "\tmap.AddOverlay(wrCreateMarker($latitude, $longitude, \"" . htmlspecialchars(addslashes($pageTitle)) . "\", wrSleddingIcon));\n";
+ return "\tmap.addOverlay(wrCreateMarker($latitude, $longitude, \"" . htmlspecialchars(addslashes($pageTitle)) . "\", wrSleddingIcon));\n";
}
}