Welcome to Geeklog, Anonymous Friday, April 19 2024 @ 12:42 am EDT

Geeklog Forums

Add Google Map to articles


Auspexian

Anonymous
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&amp;v=2&amp;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>
 Quote

Auspexian

Anonymous
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)
);
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Did you check out the earlier posts on the topic?

bye, Dirk
 Quote

Auspexian

Anonymous
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
 Quote

All times are EDT. The time is now 12:42 am.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content