We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

SL Google Map Field Type : Google Maps in your CP, SAEFs, and EE templates : Now with map types in the CP

Development and Programming

HotLimbo's avatar
HotLimbo
67 posts
16 years ago
HotLimbo's avatar HotLimbo

Map appears at top 15% of browser window. Wondering what is going on?

Please see this thread for code and picture of the problem: http://ellislab.com/forums/viewthread/120145/

       
Stephen Lewis's avatar
Stephen Lewis
466 posts
16 years ago
Stephen Lewis's avatar Stephen Lewis
Map appears at top 15% of browser window. Wondering what is going on?

Have you tried setting the height of the map div using CSS?

Stephen

       
HotLimbo's avatar
HotLimbo
67 posts
16 years ago
HotLimbo's avatar HotLimbo

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>
       
HotLimbo's avatar
HotLimbo
67 posts
16 years ago
HotLimbo's avatar HotLimbo

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;
}
       
HotLimbo's avatar
HotLimbo
67 posts
16 years ago
HotLimbo's avatar HotLimbo

There is hope still for us donks…

       
Stephen Lewis's avatar
Stephen Lewis
466 posts
16 years ago
Stephen Lewis's avatar Stephen Lewis
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

       
Todd D.'s avatar
Todd D.
460 posts
16 years ago
Todd D.'s avatar Todd D.
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!

       
RevaCo's avatar
RevaCo
240 posts
16 years ago
RevaCo's avatar RevaCo

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

       
Stephen Lewis's avatar
Stephen Lewis
466 posts
16 years ago
Stephen Lewis's avatar Stephen Lewis

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

       
Stephen Lewis's avatar
Stephen Lewis
466 posts
16 years ago
Stephen Lewis's avatar Stephen Lewis

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

       
RevaCo's avatar
RevaCo
240 posts
16 years ago
RevaCo's avatar RevaCo

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.

       
Stephen Lewis's avatar
Stephen Lewis
466 posts
16 years ago
Stephen Lewis's avatar Stephen Lewis

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

       
RevaCo's avatar
RevaCo
240 posts
16 years ago
RevaCo's avatar RevaCo

Hello Steven.

I’ll install on another ee installation and let you know if the same issue arises.

Thanks for the response. John

       
Stephen Lewis's avatar
Stephen Lewis
466 posts
16 years ago
Stephen Lewis's avatar Stephen Lewis

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

       
dvdconsulting's avatar
dvdconsulting
55 posts
16 years ago
dvdconsulting's avatar dvdconsulting

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!

       
First 5 6 7 8 9 Last

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.