Embedding Google Maps

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
herbshirt
Forum Members
Forum Members
Posts: 145
Joined: Thu Jul 26, 2007 3:47 am

Embedding Google Maps

Post by herbshirt »

I had some trouble using the Google Maps module so decided to just use the embed code supplied by Google.
I tried to submit but got....

"Google 
Error


    Forbidden
    Your client does not have permission to get URL /maps?etcetc...

Any ideas what that measn and how I may go about fixing it?

FYI: When I tried the Google Maps module I did the Location search thing, it spat out a default longitude and latitude. When I pasted that I was pointing at Mexico... it was suppoed to point to Australia.


Thanks
Herb.
Last edited by herbshirt on Thu Aug 23, 2007 6:13 am, edited 1 time in total.
herbshirt
Forum Members
Forum Members
Posts: 145
Joined: Thu Jul 26, 2007 3:47 am

Re: Embedding Google Maps - further

Post by herbshirt »

I have been able to embed the Google map. Grabbed the 'long' and the 'Lat'using this method: http://lifehacker.com/software/google-m ... 267361.php

Pretty cool!
But I also have a couple of URLS a client has supplied for a couple of 'My Maps' he created. Should I be able to treat these the same? Or do I enter those as a 'New Marker'? If so where do I enter the URL? And what is the 'Address Lookup' all about?

When I tried to embed without using the module I got the error mentioned previously.

I used the same embed code in a normal html page in the same folder with no problem so I'm reasonably sure its cms ms thats the problem and not the server etc.

Any help really appreciated.
Last edited by herbshirt on Wed Aug 22, 2007 7:12 am, edited 1 time in total.
cyberman

Re: Embedding Google Maps

Post by cyberman »

Thanks - it works :) ...
herbshirt
Forum Members
Forum Members
Posts: 145
Joined: Thu Jul 26, 2007 3:47 am

Re: Embedding Google Maps

Post by herbshirt »

What works? :-\
cyberman

Re: Embedding Google Maps

Post by cyberman »

Sorry, I doesn't know something about googlemaps module cause it's not work for me.

I'm using direct embeding in template.

I meant the grabbing of long and lat - doesn't know it before :).
herbshirt
Forum Members
Forum Members
Posts: 145
Joined: Thu Jul 26, 2007 3:47 am

Re: Embedding Google Maps

Post by herbshirt »

OK  but does nayone have an answer??

The module admits to 'icons not working yet' but if I try addingthe embed code using the html editor of course, straight into the page I get an error.


- Not Found

The requested URL was not found on this server. -



I'd like to embed the page, icons and all.
cyberman

Re: Embedding Google Maps

Post by cyberman »

herbshirt wrote: I'd like to embed the page, icons and all.
Do you mean something like this?

http://test.cmsmadesimple.de/index.php?page=googlemaps

I've done it with Googles API help at

http://www.google.com/apis/maps/documen ... index.html
herbshirt
Forum Members
Forum Members
Posts: 145
Joined: Thu Jul 26, 2007 3:47 am

Re: Embedding Google Maps

Post by herbshirt »

Yes that's exactly what I mean. I'll give it a go tomorrow. Thanks. I'm sure I've visited that page but perhaps I missed something.
cyberman

Re: Embedding Google Maps

Post by cyberman »

Feel free to ask if you have trouble with.
DeKa
New Member
New Member
Posts: 3
Joined: Thu Aug 30, 2007 12:39 pm

Re: Embedding Google Maps

Post by DeKa »

cyberman wrote: Do you mean something like this?
http://test.cmsmadesimple.de/index.php?page=googlemaps
I've done it with Googles API help at
http://www.google.com/apis/maps/documen ... index.html
Can you copy and paste the code you entered to make it work as at the test site above?
That'd be great!
Thanks,
Derek.
nichess
Forum Members
Forum Members
Posts: 28
Joined: Wed Feb 28, 2007 7:33 am

Re: Embedding Google Maps

Post by nichess »

Hello,

is this what you are searching for: http://forum.cmsmadesimple.org/index.ph ... 366.0.html
cyberman

Re: Embedding Google Maps

Post by cyberman »

DeKa wrote: Can you copy and paste the code you entered to make it work as at the test site above?
1. Create a special template for google maps view

2. Add this in head area

Code: Select all

{literal}
    <__script__ src="http://maps.google.com/maps?file=api&v=2&key=ABQIAAAA5B13I_eLkg8RuuLqqqXMFBR1buWbQ6wM6JwAKEukqPCmDhr4WxTPBb02wp0bfIQeixTLg2XdW7EkSQ"
      type="text/javascript"></__script>
    <__script__ type="text/javascript">

    //<![CDATA[

    function load() {
      if (GBrowserIsCompatible()) {
var map = new GMap2(document.getElementById("map"));
        map.addControl(new GSmallMapControl());
        map.addControl(new GMapTypeControl());
var center = new GLatLng(50.958210469307666, 13.842086791992188);
map.setCenter(center, 13);

var marker = new GMarker(center, {draggable: true});

GEvent.addListener(marker, "dragstart", function() {
  map.closeInfoWindow();
  });

GEvent.addListener(marker, "dragend", function() {
  marker.openInfoWindowHtml("Just bouncing along...");
  });

map.addOverlay(marker);


      }
    }

    //]]>
    </__script>
{/literal}
3. Change values of "key" and "new GLatLng"

4. Modify body tag like

Code: Select all

</__body onload="load()" onunload="GUnload()">
5. Add this to content

Code: Select all

<div style="width: 500px; height: 300px" id="map"> </div>
Last edited by cyberman on Thu Sep 13, 2007 3:09 pm, edited 1 time in total.
Post Reply

Return to “CMSMS Core”