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

jwmatlock's avatar
jwmatlock
14 posts
16 years ago
jwmatlock's avatar jwmatlock

Looks like the “VZ URL” field type is causing some problems. When turned off, the map shows up. When on, I get the error I mentioned above.

Here is what Firebug was showing me when VZ URL was on coming from the ff_vz_url.js file:

$.fn.ffMatrix is undefined
[Break on this error] $.fn.ffMatrix.onDisplayCell['ff_vz_url'] = function($td) {

Not sure where the conflict is.

       
Stephen Lewis's avatar
Stephen Lewis
466 posts
16 years ago
Stephen Lewis's avatar Stephen Lewis
Looks like the “VZ URL” field type is causing some problems. When turned off, the map shows up. When on, I get the error I mentioned above.

I take it the VZ URL field type works fine when the SL Google Map extension isn’t included..?

If so: * What version of FF are you using? * What browser (and version) are you using? * What platform are you using?

It’s probably also worth contacting the developer of VZ_URL, to see if he / she can shed some light on this.

Cheers, Stephen

       
Jeff  Adams's avatar
Jeff Adams
9 posts
16 years ago
Jeff  Adams's avatar Jeff Adams

Hey Stephen,

Currently I’m using Mark Huot’s Geo Coordinates extension because it allows me access to the raw data. This way I can show one map that contains all the pins from multiple weblog entries. Is this possible with your extension because I sure would like to use it.

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

Hi Jeff,

Currently I’m using Mark Huot’s Geo Coordinates extension because it allows me access to the raw data. This way I can show one map that contains all the pins from multiple weblog entries. Is this possible with your extension because I sure would like to use it.

Not having used Mark’s extension, I can’t really comment about the similarities (or differences) between the two. If you just need to output the pin co-ordinates for multiple weblog entries, the following snippet of code will do that (assuming the SL Google Map field is called “map”):

{exp:weblog:entries weblog="locations" disable="categories|category_fields|member_data|pagination|trackbacks"}
{map}
{pin_lat}, {pin_lng}
{/map}
{/exp:weblog:entries}

Hope that helps.

Cheers, Stephen

       
Mark Bowen's avatar
Mark Bowen
12,637 posts
16 years ago
Mark Bowen's avatar Mark Bowen

Hi Stephen,

Was just using this today and I’m probably being silly and missing a parameter somewhere but is it possible to make the map go into satellite view mode instead of just roads? In fact both satellite and mixed mode would be great if it can do this?

By the way, it’s a really really neat addition this one so thanks for that. Had Google Maps working previously using my own technique but this is definitely a lot better.

Best wishes,

Mark

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

Hey Mark,

Was just using this today and I’m probably being silly and missing a parameter somewhere but is it possible to make the map go into satellite view mode instead of just roads? In fact both satellite and mixed mode would be great if it can do this?

No silliness on your part, I just haven’t implemented this yet. It’s top of the to-do list for the next release, but that’s probably a couple of weeks off. If you always need one of the map types, it’s possible to hack the code (I’ll point you at the relevant line) — let me know if that helps.

Cheers, Stephen

       
Mark Bowen's avatar
Mark Bowen
12,637 posts
16 years ago
Mark Bowen's avatar Mark Bowen
…it’s possible to hack the code (I’ll point you at the relevant line) — let me know if that helps. Cheers, Stephen

By all means, do please point away 😉

Actually I’m hoping that when you do your next update it would be possible to (on the actual weblog entries display side of things) choose whether or not to show the different map / satellite choices and if so which ones or also only show it in one style of choosing. That would be great if you can implement that?

For now though please do point away 😉 Much appreciated.

Best wishes,

Mark

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

Mark,

Actually I’m hoping that when you do your next update it would be possible to (on the actual weblog entries display side of things) choose whether or not to show the different map / satellite choices and if so which ones or also only show it in one style of choosing. That would be great if you can implement that?

That’s the plan.

For now though please do point away.

If you want to display the standard map types control, you just need to comment out the following lines in global_script.js:

ui.controls.maptypecontrol = false;
ui.controls.menumaptypecontrol = false;

You can also control the exact map types that are displayed in the map types menu by adding some code just below the lines you commented out. For example, the following code will only make the satellite and hybrid maps available for selection.

ui.maptypes.normal = false;
ui.maptypes.satellite = true;   // Not strictly necessary, included for completeness.
ui.maptypes.hybrid = true;  // Not strictly necessary, included for completeness.
ui.maptypes.physical = false;

If you have any problems, just give me a shout.

Cheers, Stephen

       
Mark Bowen's avatar
Mark Bowen
12,637 posts
16 years ago
Mark Bowen's avatar Mark Bowen
Mark,
Actually I’m hoping that when you do your next update it would be possible to (on the actual weblog entries display side of things) choose whether or not to show the different map / satellite choices and if so which ones or also only show it in one style of choosing. That would be great if you can implement that?
That’s the plan.

Excellent 😉

If you have any problems, just give me a shout.

Thanks will give this a go later from home and let you know how I get on. I’m sure it should go okay though.

Best wishes,

Mark

       
Mark Bowen's avatar
Mark Bowen
12,637 posts
16 years ago
Mark Bowen's avatar Mark Bowen

Hi Stephen,

Just to let you know that I got it working the way I wanted using some of your code from above so thanks for that 😊

Was just also wondering if in your next update it would be possible to have more than one pin on a map?

Best wishes,

Mark

       
Deron Sizemore's avatar
Deron Sizemore
1,033 posts
16 years ago
Deron Sizemore's avatar Deron Sizemore

I’m currently using the CoolLocation extension on a site and it’s served the purpose but can be a little buggy at times. This looks like a good replacement, but I’m wondering if it’s possible to geocode a point on the map from the publish page from other custom fields.

The way CoolLocation works is by using built in address custom fields (just basic text fields for address, city, state, zip) and taking that information and then plotting the latitude and longitude points on the map. Wondering if this does something similar or would I have to manually go into every single entry and pinpoint the address on the map manually?

I have around 300 entries with maps attached and wouldn’t not want to manually change them one by one. 😉

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

Hey Mark,

Glad you got it working, thanks for letting me know.

Was just also wondering if in your next update it would be possible to have more than one pin on a map?

My to-do list for SL Google Map currently looks (broadly) like this: 1. Implement different map types (satellite, terrain, etc). 2. Implement multiple pins on a single map. 3. Implement “aggregated” maps, whereby you can output all the pins from a series of weblog entries on a single map. 4. Expose the Google Map events, to enable greater interaction with the maps — click on a pin, and a details box appears, that sort of thing.

Item 1 will be coming soon, as I mentioned above. The others — items 2 and 3 in particular — are a lot of work, and as ever time is an issue, particularly when there’s paid work to be done.

Depending on quite how much work is involved, I may consider making version 2 (incorporating the last 3 items on that list) a commercial extension — that way, at least I can justify spending some time on it, and get it built in a reasonable timeframe.

I haven’t made that decision yet, but I’d rather be open about the fact I’m considering it, particularly as more people start to use this extension.

Apologies for the rather rambling answer to your simple question, now just seemed like as good a time as any to mention this.

Cheers, Stephen

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

Hi Deron,

I’m currently using the CoolLocation extension on a site and it’s served the purpose but can be a little buggy at times. This looks like a good replacement, but I’m wondering if it’s possible to geocode a point on the map from the publish page from other custom fields. The way CoolLocation works is by using built in address custom fields (just basic text fields for address, city, state, zip) and taking that information and then plotting the latitude and longitude points on the map. Wondering if this does something similar or would I have to manually go into every single entry and pinpoint the address on the map manually?

The short answer is no. The slightly longer, and much less depressing, answer is perhaps; it all depends on how CoolLocation stores the pin location.

I confess that I never actually managed to get CL working (which is one of the things that drove me to build this extension in the first place) so I really don’t have any idea how it works behind the scenes. However, assuming that it stores the latitude and longitude in a format that can be easily retrieved from the database, it should be possible to write a script that does the conversion donkey-work.

If you can provide some information on how CoolLocation stores its information, I’m happy to pitch in with some pointers on writing a conversion script.

Hope that helps.

Cheers, Stephen

       
TheBrad's avatar
TheBrad
48 posts
16 years ago
TheBrad's avatar TheBrad

I, too, am getting the message “Sorry, but you need JavaScript enabled in order to use this feature.” in the Publish New Entry panel.

The only error Safari reports is “Resource interpreted as script but transferred with MIME type text/html.” for global_script.js

I have no extensions running except FieldFrame and jQuery for the Control Panel.

Any ideas?

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

Hi Brad,

Is this in the Control Panel, or a template?

Stephen

       
1 2 3 4 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.