Re: [OpenLayers-Users] Google Maps not working

2010-03-04 Thread M_Airola

Try this:
var gmap = new OpenLayers.Layer.Google(G_PHYSICAL_MAP,
{ sphericalMercator: true,
isBaseLayer: true} );

and don't forget the Javascript at the beginning:
script
src='http://maps.google.com/maps?file=apiamp;v=2amp;key=INSERT_YOUR_KEY_HERE'
type='text/javascript'/script


Good luck,
Matt
-- 
View this message in context: 
http://n2.nabble.com/Google-Maps-not-working-tp4660612p4674406.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
___
Users mailing list
Users@openlayers.org
http://openlayers.org/mailman/listinfo/users


Re: [OpenLayers-Users] Google Maps not working

2010-03-02 Thread Eric Lemoine
On Tuesday, March 2, 2010, shiv_sms s...@atree.org wrote:

 Iam new to Openlayers.

 Iam trying to render google maps in openlayers. I have used the google maps
 example source code and replaced it with google maps api key for our domain.

 When i try to load the page i seem to get this error persistently and google
 maps doesnt load,

 Error: G_PHYSICAL_MAP is not defined

 when i check, it is pointing to the source line,

 var gphy = new OpenLayers.Layer.Google(Google Physical, {type:
 G_PHYSICAL_MAP});

 Iam clueless as to what this error is all about. Can somebody please help
 me.

Hi. Do you have a script tag referencing the Google Maps API in your
page? Look at the spherical-mercator.html example.

Cheers,

-- 
Eric Lemoine

Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex

Tel : 00 33 4 79 44 44 96
Mail : eric.lemo...@camptocamp.com
http://www.camptocamp.com
___
Users mailing list
Users@openlayers.org
http://openlayers.org/mailman/listinfo/users