Welcome to Geeklog, Anonymous Wednesday, February 05 2025 @ 09:59 am EST
Geeklog Forums
Google Maps in GL 1.4.1
polar
Anonymous
I have done a bit a searching on this site but have not found anyone who has reported a problem with google maps and the latest version of GL.
I have been running a 1.4.0 GL site with Google Maps as outlined in the story Making a google map to go along with your articles Now that I have the latest GL 1.4.1 code I get an authorization error. I can see the method used to call the static pages has changed.
Is there a way to now call the Google Map vars to a static page?
polar
I have been running a 1.4.0 GL site with Google Maps as outlined in the story Making a google map to go along with your articles Now that I have the latest GL 1.4.1 code I get an authorization error. I can see the method used to call the static pages has changed.
Is there a way to now call the Google Map vars to a static page?
polar
13
13
Quote
Status: offline
jmucchiello
Forum User
Full Member
Registered: 08/29/05
Posts: 985
Quote by: polar
This is an option in the static page editor. Make sure you are using the proper return type. I can see the method used to call the static pages has changed.
12
8
Quote
Status: offline
trampoline
Forum User
Full Member
Registered: 02/24/06
Posts: 392
Hello I need Google Maps now on my site and Auto Tags is not working, I would like maps on articles.
Any suggestions ?
This must be possible... ?
Any suggestions ?
This must be possible... ?
15
15
Quote
railwayman
Anonymous
I run Google Maps in both GL and the GL plugin Dokuwiki without problem. You must ensure the authentification code is correct otherwise it won't work.
Wayne
Wayne
10
9
Quote
Status: offline
trampoline
Forum User
Full Member
Registered: 02/24/06
Posts: 392
Quote by: railwayman
I run Google Maps in both GL and the GL plugin Dokuwiki without problem. You must ensure the authentification code is correct otherwise it won't work.
Wayne
How do you run it ?
the raw link fails, if I try to use autotags it either fails or shows odd things ??
Can you explaine that would be great.
12
11
Quote
Status: offline
Laugh
Site Admin
Admin
Registered: 09/27/05
Posts: 1472
Location:Canada
Here is the code I use for google maps in a static page. No special settings neeeded for the staticpage. Put this code at the start. Change the key and the latitude and longatude numbers to what you want. Also change the Address market info.
<script src="http://maps.google.com/maps?file=api&v=2&key=YourKeyGoesHere"
type="text/javascript"></script>
<script type="text/javascript">
//<![CDATA[ // Creates a marker at the given point with the given number label function createMarker(point) { var marker = new GMarker(point); GEvent.addListener(marker, "click", function() { marker.openInfoWindowHtml("Address Marker,
Information Here!"); }); return marker; } function load() { if (GBrowserIsCompatible()) { var map = new GMap2(document.getElementById("my_map")); var marker = new GLatLng(33.6856,-33.6878); map.addControl(new GSmallMapControl()); map.setCenter(new GLatLng( 33.6986944, -33.691388), 8); map.addOverlay(createMarker(marker)); } } //]]>
</script>
Put this code where you want the map to appear in the staticpage.
<body onload="load()" onunload="GUnload()">
<div id="my_map" style="width: 500px; height: 500px"></div>
</body>
One of the Geeklog Core Developers.
Text Formatted Code
<script src="http://maps.google.com/maps?file=api&v=2&key=YourKeyGoesHere"
type="text/javascript"></script>
<script type="text/javascript">
//<![CDATA[ // Creates a marker at the given point with the given number label function createMarker(point) { var marker = new GMarker(point); GEvent.addListener(marker, "click", function() { marker.openInfoWindowHtml("Address Marker,
Information Here!"); }); return marker; } function load() { if (GBrowserIsCompatible()) { var map = new GMap2(document.getElementById("my_map")); var marker = new GLatLng(33.6856,-33.6878); map.addControl(new GSmallMapControl()); map.setCenter(new GLatLng( 33.6986944, -33.691388), 8); map.addOverlay(createMarker(marker)); } } //]]>
</script>
Put this code where you want the map to appear in the staticpage.
Text Formatted Code
<body onload="load()" onunload="GUnload()">
<div id="my_map" style="width: 500px; height: 500px"></div>
</body>
One of the Geeklog Core Developers.
11
13
Quote
Status: offline
trampoline
Forum User
Full Member
Registered: 02/24/06
Posts: 392
Will this work for a story as well ?
11
12
Quote
Status: offline
Laugh
Site Admin
Admin
Registered: 09/27/05
Posts: 1472
Location:Canada
It should if you use it only once (I used it in our Contact Us staticpage). If you use it multiple times and the stories appear on the same page then there will be problems with the ids, etc...
One of the Geeklog Core Developers.
One of the Geeklog Core Developers.
13
16
Quote
Status: offline
trampoline
Forum User
Full Member
Registered: 02/24/06
Posts: 392
Possibly it would be OK if the map opened in a pop up window then it could be used more times.
However since everyone is using Google maps now it would be really good to use something more functional, is anyone able to write something ?
However since everyone is using Google maps now it would be really good to use something more functional, is anyone able to write something ?
11
16
Quote
All times are EST. The time is now 09:59 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