Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Widgets

Discuss SilverStripe Widgets.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

MapWidget errors


Reply

2 Posts   853 Views

Avatar
ICM

6 May 2011 at 7:54pm Community Member, 3 Posts

I have installed the widget as instructed and received a new API code from google to enter in the config file but I still get the "this web site needs a different Google Maps API key..." and then "Browser is not map compatible! Maps will not be shown" in chrome, IE and FireFox.

any ideas what might be wrong?

Thx

Avatar
Yambo

1 December 2011 at 2:04am (Last edited: 1 December 2011 2:05am), Community Member, 4 Posts

I also had a similar problem with the Map Widget. The API key in the config file wasn't working for me and so I manually added it to the controller.

I changed line 32 on the MapWidget.php from;

   Requirements::javascript("http://maps.google.com/maps?file=api&v=2&key=".$MapsWidgetAPIKey);

to this (add your Google API key);

   Requirements::javascript("http://maps.google.com/maps?file=api&v=2&key=ADD-YOUR-API-KEY-HERE");

This worked for me.