Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2012-03-13 18:33:45

hilaryaq
Plugin Author
Registered: 2006-08-20
Posts: 335
Website

pro_googlemapv3 - Google Maps V3 with multiple markers

By multiple I mean 2 :) But easily more can be added for now you can add a single or double marker.

I made this because the fabulous rss_google_map does not display on mobile or ipad being based on the now deprecated Google Maps V2, it also didn’t support more than one marker on one map, as I had a client with two shops had to put this together and would like to share it out, as far as I know no-one has any plugin for Google Maps V3 or multiple markers (Multiple markers are difficult to achieve took a long time to get the code right, a lot of people around the Internet screaming out for help for it..)

Hope it helps someone! Send back any feedback..

Web link to download, help in help file with plugin

Last edited by Gocom (2012-03-13 19:50:57)


…………………
I <3 txp
…………………

Offline

#2 2012-03-13 19:44:01

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: pro_googlemapv3 - Google Maps V3 with multiple markers

Cool. Nice to see new plugins to land these grounds.

hilaryaq wrote:

as far as I know no-one has any plugin for Google Maps V3

Sure there are not many widgets. Static, widget type of plugins are not exactly mandatory and have the habit to be rather limiting. But that’s what widgets by definition are. For example outputting a Google map is just about a few lines of JavaScript thanks to the already existing API.

Hope it helps someone! Send back any feedback.

As requested, some feedback;

  • Supports only a one map per a page as a ID is used to attach the map.
  • Namespace-wise that HTML ID should be prefixed with your plugin prefix, e.g. pro_map_canvas (to comply the guidelines and to avoid conflicts).
  • Outputs markup that doesn’t validate as XHTML (one of the script tags doesn’t have type attribute).
  • Psst heredoc

Last edited by Gocom (2012-03-13 19:48:49)

Offline

#3 2012-03-13 20:37:12

hilaryaq
Plugin Author
Registered: 2006-08-20
Posts: 335
Website

Re: pro_googlemapv3 - Google Maps V3 with multiple markers

Will do those things thanks Jukka! Yes Google maps is only allowed output one map with multiple markers on that map (anyone that edits the plugin can easily add more markers in), it’s not meant to be for multiple maps, it’s meant for the client like mine, that has two shops in one city, and trust me putting more than one marker on the map “outputting a Google map is just about a few lines of JavaScript” was more than that, it took a long time to figure out how to get a second marker on there, sounds like it should be easy, not easy to do it properly, and also not easy to find the code which allows you to put a custom title and description with each marker.. Google isn’t great for finding these bits of code easily so just hoping I can save someone as much time as it took me!


…………………
I <3 txp
…………………

Offline

#4 2012-03-13 20:40:33

hilaryaq
Plugin Author
Registered: 2006-08-20
Posts: 335
Website

Re: pro_googlemapv3 - Google Maps V3 with multiple markers

I must say though I really love v3 of Google Maps :)


…………………
I <3 txp
…………………

Offline

#5 2012-03-13 21:18:45

MattD
Plugin Author
From: Monterey, California
Registered: 2008-03-21
Posts: 1,254
Website

Re: pro_googlemapv3 - Google Maps V3 with multiple markers

Download links on the site are giving a 404


My Plugins

Piwik Dashboard, Google Analytics Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker

Offline

#6 2012-03-13 21:24:42

hilaryaq
Plugin Author
Registered: 2006-08-20
Posts: 335
Website

Re: pro_googlemapv3 - Google Maps V3 with multiple markers

Hi Matt, you must have just tried it when I was re-uploading as per Gocom feedback, can you try now? Working my end should be ok!


…………………
I <3 txp
…………………

Offline

#7 2012-03-13 22:47:23

MattD
Plugin Author
From: Monterey, California
Registered: 2008-03-21
Posts: 1,254
Website

Re: pro_googlemapv3 - Google Maps V3 with multiple markers

Looks like it’s working now.


My Plugins

Piwik Dashboard, Google Analytics Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker

Offline

#8 2012-04-24 15:32:27

joebaich
Member
From: DC Metro Area and elsewhere
Registered: 2006-09-24
Posts: 507
Website

Re: pro_googlemapv3 - Google Maps V3 with multiple markers

Hello Hilary,

A heartfelt thanks from me for this plug-in. I had a map deployed on a client’s site within minutes of it appearing. I am one of those who had been screaming (inwardly which is worse) around the Internet looking for help to produce a client friendly Google V3 map with multiple markers on it. They need eight markers but I think I can follow your clear well laid out code well enough to bump it up to that from two. I am very grateful.

Offline

#9 2012-04-24 16:18:05

MattD
Plugin Author
From: Monterey, California
Registered: 2008-03-21
Posts: 1,254
Website

Re: pro_googlemapv3 - Google Maps V3 with multiple markers

The initialize JavaScript function you output should probably be named something less generic like to avoid conflicts.


My Plugins

Piwik Dashboard, Google Analytics Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker

Offline

#10 2012-04-24 16:32:39

hilaryaq
Plugin Author
Registered: 2006-08-20
Posts: 335
Website

Re: pro_googlemapv3 - Google Maps V3 with multiple markers

Aw thanks Joe :) It’s funny it’s the first plugin I’ve made that I’m using myself for all my client sites, glad you can edit it easily too! The multiple markers thing was a pain to figure out I think it’s just badly documented for v3 and a lot of people still using v2 so a lack of info on it.. lovely comment to get tho!

Hi Matt, good point can edit that!


…………………
I <3 txp
…………………

Offline

#11 2012-04-24 16:34:48

hilaryaq
Plugin Author
Registered: 2006-08-20
Posts: 335
Website

Re: pro_googlemapv3 - Google Maps V3 with multiple markers

Mind you I would still love to make an array of markers like lat,long:lat,long and explode the array while keeping the string.. but my front-end designer brain couldn’t handle it.. something to consider for the future though if I have time I’ll try and figure that out for a future release!


…………………
I <3 txp
…………………

Offline

#12 2012-04-25 07:46:27

planeth
Plugin Author
From: Nantes, France
Registered: 2009-03-19
Posts: 215
Website

Re: pro_googlemapv3 - Google Maps V3 with multiple markers

I f you don’t mind trying another plugin, feel free to test mine :

plh_export_markers
Will generate the array of lat,long from any article providing appropriate fields.
The plugin help gives you examples of code to call google map API

Offline

Board footer

Powered by FluxBB