Map doesn't show - more from closed topic
Posted: Mon May 18, 2015 11:23 am
This post in in response to the auto-closed topic: http://forum.cmsmadesimple.org/viewtopi ... oogleMaps2
Yes, I suffered the same pain as you. Took a bit of investigating especially as I had copied the map template from one site that worked (bootstrap framework) to another (zurb framework).
The map was in the HTML but not visible on the screen. First part of the solution was to change the css to ensure that the div had a defined height and change the css position from absolute to relative:
Next part of the solution was to change my self-defined call to jQuery to use the {cms_jquery} tag which calls the jQ UI script. Of course, no mention of that in the CGGM2 dependencies... Very relieved that the CMSMS called version of jQuery did not stuff up other jQuery scripts in my template.
Also, as javascripts in my template are below the body tag, as recommended, I used the trick of moving js from module templates to the end of the page - then detaching the map from the end of the page and putting it in the right place in the content. See http://forum.cmsmadesimple.org/viewtopi ... =4&t=70092 for more info.
Hope this response is not too late to help you.
psy
Yes, I suffered the same pain as you. Took a bit of investigating especially as I had copied the map template from one site that worked (bootstrap framework) to another (zurb framework).
The map was in the HTML but not visible on the screen. First part of the solution was to change the css to ensure that the div had a defined height and change the css position from absolute to relative:
Code: Select all
#cggm_map_1 {
position: relative !important;
overflow: hidden;
transform: translateZ(0px);
background-color: rgb(229, 227, 223);
min-height: 200px !important;
}
Also, as javascripts in my template are below the body tag, as recommended, I used the trick of moving js from module templates to the end of the page - then detaching the map from the end of the page and putting it in the right place in the content. See http://forum.cmsmadesimple.org/viewtopi ... =4&t=70092 for more info.
Hope this response is not too late to help you.
psy