Forum
Google maps problem with content custom
Hi!
I have maps in events. Then I try to show multiple event details on frontpage with events_custom and with specific template.
It's called three times:
<?php
perch_events_custom(array(
'filter'=>'eventDateTime',
'match'=>'gte',
'value'=>date('Y-m-d'),
'sort'=>'eventDateTime',
'sort-order'=>'desc',
'count'=> 3,
'template'=>'front_page_3.html'
));
?>
In the template I have:
<div class="front_map"><perch:events id="place_map" type="map" label="Address" zoom="15" /></div>
... for some reason I get in the console:
Failed to load resource: the server responded with a status of 403 (Forbidden)
Any ideas how to fix this? I have regular javascript API enabled from google and the map works fine in the event page. I tried republishing, but didn't help.
Thanks!
Are you sure your Google Maps API key is correctly configured at the Google end of things?
Hi, Drew.
Pretty sure. It just uses the javascript api, right?
That's logging all the back end stuff as well as visits on individual events pages. So the maps show correctly. I'm not sure if there's some sort of limitation on how many maps can one page show. There's three now, but I don't think this is the case.
It uses the JavaScript API and the Static Maps API.
Yep, they are on.
Strange thing is that it doesn't show the "oops"-layer on top. The map is grey, but you can see the marker: https://www.puritas.fi/
What do you mean by "oops" layer? The maps look fine to me.
I mean normally when the api is not on, Google puts on top of the map something like "Ooops, the map cannot be shown... etc.".
But you can actually see the three little maps on the front page? That's very bizarre. I tried also with my cell from different ip and didn't see them. Nor can I see them on IE, FF or Chrome.
Just the map box, with the red map pointer, but no map. When I zoom in / out of the map then it shows.
Here's what I get: https://www.dropbox.com/s/izltvh4543w60wl/maps.png?dl=0
Wow, here's mine: https://dl.dropboxusercontent.com/u/2713294/Sieppaa.PNG
Hello, again.
It was about CSS. This is what I had:
Changed it to a bit more conservative:
Still in Chrome for some reason the border-radius doesn't work any more. I did this a couple of years ago and then everything was fine.
Thanks for the assist!
Ok - I'm not sure we can help with that issue.