Adding Google Maps to page template without a block?
Permalink
I just converted a basic html site to C5's custom theme. Our contact page had a minimal Gmaps that was working nicely, but now the div is just empty?!
I would greatly appreciate if someone pointed me where the problem might be, as I can't see any problem how I couldn't hardcode a little Gmaps to a page...?
Here's the page:
http://xn--jsenkorjaustampere-ltb.fi/yhteystiedot...
I would greatly appreciate if someone pointed me where the problem might be, as I can't see any problem how I couldn't hardcode a little Gmaps to a page...?
Here's the page:
http://xn--jsenkorjaustampere-ltb.fi/yhteystiedot...
Here is a good rule,
Rule #1 NEVER edit files in the /updates or /concrete folder,
first copy the files from /updates/updateversion//concrete or /concrete to the top level folders,
eg: /concrete/blocks/google_map/ would be copied to /blocks before you edit it,
Rule #1 NEVER edit files in the /updates or /concrete folder,
first copy the files from /updates/updateversion//concrete or /concrete to the top level folders,
eg: /concrete/blocks/google_map/ would be copied to /blocks before you edit it,
As the title tells, this problem is with adding Google maps to theme >without< a block... ;)
why not just hardcode the googlemaps block,
Because I already have the map ready and customized map in the HTML code, that I just wan't to concretize. And I don't see where the problem lies when I cannot do so - div is just empty while it was working nicely with HTML?
It is done! Seem like I had used my outdated code, that still used onload(); in the body.
It works fine with this code in the head:
Here's the page live:
http://jäsenkorjaustampere.fi/yhteystiedot...
It works fine with this code in the head:
<script type="text/javascript" src="http://maps.google.com/maps?file=api&v=2&sensor=false&key=ABQIAAAAmLhf9q4TxB2D0DC6igHCCxRatsdiTEq_mIahFtFzEANnJkLnURR4vYGZJbfm6QTtSNCtYQoHBzY0Wg"></script> <script type="text/javascript"> $(function() { if (GBrowserIsCompatible()) { var map = new GMap2(document.getElementById("map_canvas")); var point = new GLatLng(61.495032, 23.767086); map.setCenter(point, 13); map.setUIToDefault(); map.addOverlay(new GMarker(point)); map.getContainer().style.overflow="hidden"; } }); </script>
Here's the page live:
http://jäsenkorjaustampere.fi/yhteystiedot...
I don't usually recommend editing the source, but in this annoying case when it comes up blank after editing it after insertion, I have just edited the /concrete/blocks/google_map/controller.php file and changed in the very beginning of the file the line
NOTE: You must make the above recommend changes to the current working copy of concrete core files. So check in the /updates folder in case there are any folders in there and make the changes to the highest version numbered directory.