Problem with google maps, google is not defined

8,663 views
Skip to first unread message

Opel

unread,
Nov 17, 2010, 5:44:54 PM11/17/10
to Google Maps JavaScript API v3
I am trying to set up google maps on a wordpress site using the new V3
and I followed the simple tutorial however in both Safari and Firefox
I get an error message : "google is not defined" on the line

"var myLatlng = new google.maps.LatLng(55.950150,-3.20940); "

I've searched google and this group and can't see anything to try?

The page in question is : http://floorplay.gunkdesign.co.uk/contact
(map should load under "venue location")

Any help is appreciated.

geoco...@gmail.com

unread,
Nov 17, 2010, 6:31:58 PM11/17/10
to Google Maps JavaScript API v3
Where do you think you include the API code?
http://code.google.com/apis/maps/documentation/javascript/tutorial.html#HelloWorld

-- Larry

Opel

unread,
Nov 17, 2010, 6:40:28 PM11/17/10
to Google Maps JavaScript API v3
HI larry this is how it is set (tried true and false)

<script type="text/JavaScript" src="http://maps.google.com/maps/apis/
js?sensor=true"></script>


<script type="text/javascript">
function initialize() {
var myLatlng = new google.maps.LatLng(55.950150,-3.20940);
var myOptions = {
zoom: 8,
center: myLatlng,
mapTypeId: google.maps.MapTypeId.ROADMAP
};
var map = new
google.maps.Map(document.getElementById("map_canvas"), myOptions);
}
</script>

geoco...@gmail.com

unread,
Nov 17, 2010, 8:40:13 PM11/17/10
to Google Maps JavaScript API v3
On Nov 17, 3:40 pm, Opel <andy...@mac.com> wrote:
> HI larry this is how it is set (tried true and false)
>
> <script type="text/JavaScript" src="http://maps.google.com/maps/apis/
> js?sensor=true"></script>

Did you try the url from the documentation?
<script type="text/javascript" src="http://maps.google.com/maps/api/js?
sensor=false"></script>
(notice the missing "s" api vs. apis)

-- Larry

Andrew Cetnarskyj

unread,
Nov 18, 2010, 4:35:35 AM11/18/10
to google-map...@googlegroups.com
thanks fixed it

> --
> You received this message because you are subscribed to the Google
> Groups "Google Maps JavaScript API v3" group.
> To post to this group, send email to google-map...@googlegroups.com
> .
> To unsubscribe from this group, send email to google-maps-js-a...@googlegroups.com
> .
> For more options, visit this group at http://groups.google.com/group/google-maps-js-api-v3?hl=en
> .
>

Reply all
Reply to author
Forward
0 new messages