Yes. I did.
I added this class to the div.
.mapbox {
height: 500px;
width: 800px;
}
Same thing still happening.
<div class="mapbox">
{exp:weblog:entries weblog="maps" disable="categories|category_fields|member_data|pagination|trackbacks"}
{google-map id="example-map" controls="zoom|scale|overview" map="drag|click_zoom|scroll_zoom" pin="drag|center"}
{map}
This is the fallback content for users who cannot see the Google Map.{/map}
{/google-map}
{/exp:weblog:entries}</div>
Fixed it!
Wrong Div! The div for the container has an id=”example-map” class=”sl-google-map” reference. This does not appear in the template prior to publishing live. But only in the rendered version. All that had to be done was add this css.
#example-map {
height: 500px;
width: 800px;
}
Fixed it! Wrong Div! The div for the container has an id=“example-map” class=“sl-google-map” reference. This does not appear in the template prior to publishing live. But only in the rendered version.
That’s correct, you set it using the”id” property. There’s also a “class” property, should you need it. Full details are in the docs.
Glad you got it sorted.
Cheers, Stephen
Fixed it! Wrong Div! The div for the container has an id=”example-map” class=”sl-google-map” reference. This does not appear in the template prior to publishing live. But only in the rendered version. All that had to be done was add this css.#example-map { height: 500px; width: 800px; }
I’m having some similar trouble. The only way I can get the map to work is if I use the field id which the docs directs NOT to do.
I can’t seem to figure out which div to give the id to. I have tested several and they all fail.
In addition, the plugin seems to be bringing in a massive amount of css directly into the body of the document along with some javascript.
I’m feeling a bit lost with this right now. I am trying to use this in a SAEF. It works in the control panel… but not the SAEF.
In addition… does an entry need to already exist in the db or can you use the SAEF to add new entries to the db?
Thanks for any assistance!
Is anyone having an issue with the map default zoom?
I’ve installed today for the first time v1.0.9
I have set the default level zoom to 11 but… both front end and control panel display display maps at the zoom level 1 (whole world)
The setting stays at 11 in CP Home>Admin>Utilities>Fieldtypes Manager so it’s saving to the db but is not being used when creating or viewing entries.
{map_zoom} placeholder prints 1 to screen.
Great extension by the way.
Thanks John
Hi Todd,
I’m feeling a bit lost with this right now. I am trying to use this in a SAEF. It works in the control panel… but not the SAEF. In addition… does an entry need to already exist in the db or can you use the SAEF to add new entries to the db?
It looks like there are some SAEF compatibility problems between this extension and the more recent versions of FieldFrame (possibly because I implemented the SAEF stuff before FF officially supported it). I’ll look into it, and make the required updates.
I’m having some similar trouble. The only way I can get the map to work is if I use the field id which the docs directs NOT to do. I can’t seem to figure out which div to give the id to. I have tested several and they all fail.
When outputting the map within the weblog entries tag, a div is automatically generated by the field tag, to house all the Google Map stuff. You can specify the id and class to assign to that div using the corresponding parameter, and apply your CSS (typically a width and height) accordingly.
In addition, the plugin seems to be bringing in a massive amount of css directly into the body of the document along with some javascript.
A small amount of “configuration” JS is added for each map, which is then used by the main JS file to create the maps on the page. No CSS is added. However, EE itself does add a tonne of JS to SAEFs by default (not sure about CSS).
Cheers, Stephen
John,
I have set the default level zoom to 11 but… both front end and control panel display display maps at the zoom level 1 (whole world) The setting stays at 11 in CP Home>Admin>Utilities>Fieldtypes Manager so it’s saving to the db but is not being used when creating or viewing entries. {map_zoom} placeholder prints 1 to screen.
I can’t recreate this. Can you supply me with some more detail please? - Browser and OS - FieldFrame version - Steps required to recreate the problem.
Thanks, Stephen
Hello Stephen.
Using Windows and have tried in Firefox & IE8 FieldFrame v.1.1.2 and SL Google Map 1.0.9
I just installed as per the docs, cannot think of anything erroneous that I may have done or missed.
My tags look like this:
Snipped out irrelevent code out.
{exp:weblog:entries weblog="{my_weblog}" disable="member_data|trackbacks|pagination" rdf="off" status="open" url_title="{my_url_title}" limit="1"}
<h2>{title} Location</h2>
{exhib_map id="gmap" class="map" controls="zoom|scale|overview" map="drag|click_zoom" pin="center"}
{map}This is the fallback content for users who cannot see the Google Map.{/map}
The current latitude and longitude of your map is {map_lat} and {map_lng}, respectively. The zoom-level is {map_zoom}.
The current latitude and longitude of your pin is {pin_lat} and {pin_lng}, respectively.
{/exhib_map}
{/exp:weblog:entries}
In your docs is says:
Specify the default zoom-level for all the SL Google Map field types on your site (again, this can be overridden on a map-by-map basis).
I didn’t see anywhere else in the docs about how to override the setting, Is it a non documented parameter?
Thanks John
edit: One thing I have done is take global_script.js and placed in my toplevel js folder (didn’t like it pointing to system folder) but I assure you the path to global_script.js is correct.
Hi John,
I didn’t see anywhere else in the docs about how to override the setting, Is it a non documented parameter?
This refers to the individual custom SL Google Map fields. When you create one in the CP, you can override the site-wide default latitude, longitude, and zoom level.
The code you posted looks fine. I’ll upgrade to the latest version of FieldFrame (I’m still back on 0.9.something), and let you know if I’m able to recreate the problem.
Cheers, Stephen
Hi John,
A quick update; I installed the latest version of FF, and was still unable to recreate the issue you’re having.
Have you tried it with a different location? I’m just wondering whether Google Maps has a problem with the specific location you’re attempting to pinpoint.
Cheers, Stephen
Hi Stephen. Great extension. I am having a little trouble getting my map to show up in my template, though. I can see it in the control panel and I am getting the lat and long to output, but alas… no map. I have tried it with options, and lastly, I just stripped out all options to see if I could get anything, but to no avail.
Here is my code:
{maplink}
{map}{pin_lat}{pin_lng}{/map}
{/maplink}
I have also tried this:
{maplink controls="zoom|scale|overview" map="drag|click_zoom|scroll_zoom" pin="drag|center" id="store-map"}
{map}{pin_lat}{pin_lng}{/map}
{/maplink}
The lat and long display the correct values.
Any advise is appreciated. Thanks!
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.