Welcome to Geeklog, Anonymous Thursday, May 02 2024 @ 09:52 pm EDT

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
 Quote

Status: offline

jmucchiello

Forum User
Full Member
Registered: 08/29/05
Posts: 985
Quote by: polar

I can see the method used to call the static pages has changed.

This is an option in the static page editor. Make sure you are using the proper return type.
 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... ?
 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
 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.
 Quote

Status: offline

Laugh

Site Admin
Admin
Registered: 09/27/05
Posts: 1468
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.
Text Formatted Code

<script src="http://maps.google.com/maps?file=api&amp;v=2&amp;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.
 Quote

Status: offline

trampoline

Forum User
Full Member
Registered: 02/24/06
Posts: 392
Will this work for a story as well ?
 Quote

Status: offline

Laugh

Site Admin
Admin
Registered: 09/27/05
Posts: 1468
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.
 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 ?
 Quote

All times are EDT. The time is now 09:52 pm.

  • 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