Posted on: 05/17/08 01:11pm
By: Anonymous (Auspexian)
I am looking for a way to add Google Map inside articles.
Google gives a script. I am the admin, but I can't seem to get javascript to run inside the article.
Any suggestion please?
J.
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<title>Google Maps JavaScript API Example</title>
<script src="http://maps.google.com/maps?file=api&v=2&key=ABQIAAAA9oK_hv_VztWXqgEHgfy6tRQB1cLSSG5Tb6wf1EBy4LP0BzGulxQDpmdAQGVuXCA5FDvpUG2evLJh5g"
type="text/javascript"></script>
<script type="text/javascript">
//<![CDATA[
function load() {
if (GBrowserIsCompatible()) {
var map = new GMap2(document.getElementById("map"));
map.setCenter(new GLatLng(37.4419, -122.1419), 13);
}
}
//]]>
</script>
</head>
<body onload="load()" onunload="GUnload()">
<div id="map" style="width: 500px; height: 300px"></div>
</body>
Re: Add Google Map to articles
Posted on: 05/17/08 01:29pm
By: Anonymous (Auspexian)
Oh, I did modify config.php
$_CONF['admin_html'] = array (
'p' => array('class' => 1, 'id' => 1, 'align' => 1),
'div' => array('class' => 1, 'id' => 1),
'span' => array('class' => 1, 'id' => 1),
'table' => array('class' => 1, 'id' => 1, 'width' => 1, 'border' => 1,
'cellspacing' => 1, 'cellpadding' => 1),
'tr' => array('class' => 1, 'id' => 1, 'align' => 1, 'valign' => 1),
'th' => array('class' => 1, 'id' => 1, 'align' => 1, 'valign' => 1,
'colspan' => 1, 'rowspan' => 1),
'td' => array('class' => 1, 'id' => 1, 'align' => 1, 'valign' => 1,
'colspan' => 1, 'rowspan' => 1),
'a' => array('href' => 1, 'title' => 1, 'rel' => 1, 'onclick' => 1),
'em' => array('iframe' => 1),
'br' => array(),
'tt' => array(),
'hr' => array(),
'li' => array(),
'ol' => array(),
'ul' => array(),
'code' => array(),
'pre' => array(),
'iframe' => array('embed' =>1, 'width' =>1, 'height' =>1, 'frameborder' =>1, 'scrolling' =>1, 'marginheight' =>1, 'marginwidth' =>1, 'src' =>1)
);
Re: Add Google Map to articles
Posted on: 05/17/08 01:44pm
By: Dirk
Re: Add Google Map to articles
Posted on: 05/17/08 08:18pm
By: Anonymous (Auspexian)
Yes, I am able to follow the earlier post and use the URL provided by Google.
But Google has another service with API, using the provided script with embedded key that allow more flexibility by changing just the coordinate.
I can't seem to get that script to work.
Tks
John