Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#16 2009-04-22 23:21:31

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

Re: msd_google_map: Easily associate a location with your articles

I just put together a simple example of how you can use the article location data.
In my example I’m displaying a map with markers for each article image.

View the example

edit: fixed link to map example

Last edited by MattD (2010-03-25 22:30:12)


My Plugins

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

Offline

#17 2009-04-22 23:57:43

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

Re: msd_google_map: Easily associate a location with your articles

Nice.
But… how do you get multiple markers from just one article?


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#18 2009-04-23 00:47:44

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

Re: msd_google_map: Easily associate a location with your articles

You don’t. The example is displaying markers for multiple articles.


My Plugins

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

Offline

#19 2009-04-23 10:58:54

candyman
Member
From: Italy
Registered: 2006-08-08
Posts: 684

Re: msd_google_map: Easily associate a location with your articles

MattD wrote:

Version 1.1 is fixed and ready for your enjoyment.

Thank you! Problem solved with the new release!

Offline

#20 2009-04-23 13:46:13

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

Re: msd_google_map: Easily associate a location with your articles

MattD wrote:

You don’t. The example is displaying markers for multiple articles.

Ah, ok, so you are using an article (article/map-example) to display data from other articles, instead of doing it on an article list. That confused me :).


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#21 2009-04-23 14:22:05

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

Re: msd_google_map: Easily associate a location with your articles

Yeah, sorry about that. I’ve added the code used to the article so you can see what I did.


My Plugins

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

Offline

#22 2009-04-24 16:11:40

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

Re: msd_google_map: Easily associate a location with your articles

Version 1.2 adds support for TXP 4.0.6 thanks to a tip from jm

See first post for download link

Last edited by MattD (2009-04-24 16:12:07)


My Plugins

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

Offline

#23 2009-04-26 07:12:02

aslsw66
Member
From: Canberra, Australia
Registered: 2004-08-04
Posts: 342
Website

Re: msd_google_map: Easily associate a location with your articles

Hi everyone.

Sometime ago, I did write a client side plugin to allow me to display articles on a map – the popup showed the article title and excerpt.

I have long ago pulled it from my site, but it worked. I posted by approach in response to a different thread here >== Google maps api integration

Offline

#24 2009-04-26 15:57:16

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

Re: msd_google_map: Easily associate a location with your articles

There is also a tutorial on Textbook


My Plugins

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

Offline

#25 2009-04-27 15:03:18

catnip
Member
From: Sydney Australia
Registered: 2006-07-29
Posts: 58
Website

Re: msd_google_map: Easily associate a location with your articles

Matt, pretty cool.
Is there an easy way to implement the map in a contact form or article comment so that a visitor can place the marker on the map and submit their location?

Offline

#26 2009-04-27 15:40:10

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

Re: msd_google_map: Easily associate a location with your articles

catnip wrote:

Matt, pretty cool.
Is there an easy way to implement the map in a contact form or article comment so that a visitor can place the marker on the map and submit their location?

That could easily be done using something like zem_contact_reborn. My plugin sets the value of the custom field when the map is clicked. You could similarly set the value of a hidden zem_contact field.


My Plugins

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

Offline

#27 2009-04-27 15:50:13

catnip
Member
From: Sydney Australia
Registered: 2006-07-29
Posts: 58
Website

Re: msd_google_map: Easily associate a location with your articles

Thanks for the prompt response. I’ll have to give it a try.

What I’m actually looking to do is a project in which people post where they’re coming from and where they’re going to and create a visualisation out of that. Would I have to use two maps in the contact form?

Offline

#28 2009-04-27 17:47:05

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

Re: msd_google_map: Easily associate a location with your articles

@catnip –

I threw together a little code to demonstrate how location data could be included in your contact form. I can look at selecting two locations when I have more time.


My Plugins

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

Offline

#29 2009-04-27 18:27:30

catnip
Member
From: Sydney Australia
Registered: 2006-07-29
Posts: 58
Website

Re: msd_google_map: Easily associate a location with your articles

Thanks Matt. I’m probably doing something wrong. Not sure if I need the plugin for this, but having just installed it, I can’t really see the new fields in the write tab. Do I actually need to go through this ?
BTW I’v been trying this on a 4.0.7

Offline

#30 2009-04-27 18:30:26

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

Re: msd_google_map: Easily associate a location with your articles

For the write tab you do not need to follow that tutorial. You’ve activated the plugin and updated your google maps api key on the Extensions tab here /textpattern/index.php?event=msd_google_map?


My Plugins

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

Offline

Board footer

Powered by FluxBB