Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-01-28 04:50:07

wilshire
Plugin Author
From: Akron, Ohio
Registered: 2004-08-27
Posts: 656
Website

[plugin] [ORPHAN] rss_google_map - display articles on google maps

Based on an initial suggestion by Matthew here and as a follow up to my Google Map Stats plugin, this plugin displays address data from your articles on a Google Map. This could be useful on personal/travel sites to indicate the location that a post refers to or on business sites to indicate office location(s) on a single map. And on this note I think I’ve spent enough time playing with Google Maps.

And thanks to Matthew for his donation to support the completion of the plugin.

Details

Download v0.1

Last edited by colak (2009-04-23 09:55:55)

Offline

#2 2006-01-28 17:08:14

squaredeye
Member
From: Greenville, SC
Registered: 2005-07-31
Posts: 1,495
Website

Re: [plugin] [ORPHAN] rss_google_map - display articles on google maps

Rob,
NICE! Glad to see it made it to the forums. Your definitely welcome, and thank you. This will work well for the site I am working on now, I’ll send you a link when its finished at the end of February.

Cheers man.


Offline

#3 2006-02-01 20:35:35

cap_nemo
Member
Registered: 2005-04-20
Posts: 33
Website

Re: [plugin] [ORPHAN] rss_google_map - display articles on google maps

Hey Rob,

Firstly thank you for all of your awesome plug-ins, they are invaluable. I’m currently having issues with this plugin and i wanted to just see if i was doing something wrong. I’ve set up all the custom fields and have inserted all the appropriate tags but still can’t figure out what’s going wrong. Here’s how i’m calling it.

<txp:rss_google_map section="Events" width="425" height="200" addfield="custom_5" cityfield="custom_6" statefield="custom_7" zipfield="custom_8" iconcolor="orange" />

You can see an example off what’s going wrong on this page

It’s throwing a JS error because it doesn’t seem to be calculating the location points correctly.

Any help would be much appreciated.

Thanks again!

Offline

#4 2006-02-02 03:26:18

wilshire
Plugin Author
From: Akron, Ohio
Registered: 2004-08-27
Posts: 656
Website

Re: [plugin] [ORPHAN] rss_google_map - display articles on google maps

There must be a problem with the Yahoo Geocoding service locating the address you’re trying to map. To solve the JS error, set center=“1” in your plugin call. Check out the Geocoding API page and try manually building the address request to see if Yahoo can find it.

For example: http://api.local.yahoo.com/MapsService/V1/geocode?appid=YahooDemo&location=123+Some+Streeet%2C+City%2C+ST+55555

Offline

#5 2006-02-02 05:26:48

cap_nemo
Member
Registered: 2005-04-20
Posts: 33
Website

Re: [plugin] [ORPHAN] rss_google_map - display articles on google maps

Thanks Rob. I use the Yahoo Geocoding link you sent and was successful in finding the address. Do you think there’s an issue because the custom fields are not 1-4?

UPDATE

Rob, i actually just figured it out. I was looking through the plug-in code and noticed this line.

$where = "status=4 $sections $categories AND posted < now() ";//"

It looks like you’re pulling past articles and all the examples i’m using are ‘upcoming events’ or future articles. I changed the date to a past date and it worked fine. I would really like to have it work for both past and future articles. Will i be damaging the code if i take that AND statement out?

Also if i examine the JS code that is being generated it seems to be creating multiple markers and the label for the location isn’t correct. Does this plug-in create one marker per article or per section? Ideally I’m looking for it to create one marker and label per article.

Sorry for the million questions. It’s a great plug-in and I really want to be able to implement it into the site i’m currently developing. Thanks again, Rob.

Last edited by cap_nemo (2006-02-02 15:37:13)

Offline

#6 2006-02-02 18:39:06

wilshire
Plugin Author
From: Akron, Ohio
Registered: 2004-08-27
Posts: 656
Website

Re: [plugin] [ORPHAN] rss_google_map - display articles on google maps

Ah, glad you found the first problem. It’s not a problem to remove the AND statement out if you want to pull future articles.

The plugin should be generating 1 marker per article. Do you have a URL for a page thats not working?

BTW, that site is lookin’ pretty good.

Offline

#7 2006-02-02 18:55:23

cap_nemo
Member
Registered: 2005-04-20
Posts: 33
Website

Re: [plugin] [ORPHAN] rss_google_map - display articles on google maps

Alright, well i took out the AND statement and all is still well. :)

Here is the link to the page that isn’t working right. You can see that in the code there are multiple markers and the one that’s displaying isn’t the correct address associated with that article. It also looks like it’s creating a marker for all of the events section even if they don’t have addresses associated with them.

Thanks for your comments on the site. We have a little ways to go and still have to iron some things out, but we’re getting there!

You rock.

UPDATE

I just found a HUGE setback. The google maps JS seems to totally hose up IE. I’m just now checking it. Any ideas? It looks like it’s also doing it on your about page.

UPDATE 2

I just fixed the IE issue. IE was trying to load the map before it was completely drawn, i think. Anyway, per this page’s reccommendation i added an additional function to the JS and it seems to work in IE now… SWEET!

window.onload = showMap;

function showMap() {

... all the code ...

}

Now, the only problem left is the multiple points and the incorrect address displaying!

Last edited by cap_nemo (2006-02-03 15:43:34)

Offline

#8 2006-02-03 17:32:59

wilshire
Plugin Author
From: Akron, Ohio
Registered: 2004-08-27
Posts: 656
Website

Re: [plugin] [ORPHAN] rss_google_map - display articles on google maps

I see 2 points on the map if I zoom out a little. If you look at the javascipt, 5 of the markers have the same latitude and longitude. Thats why you only see 2 markers. So it still seems like the addresses aren’t being located properly through the Geocoding process. I would need to know what the addresses are to see why they’re resolving to the same coordinates.

Offline

#9 2006-02-03 18:38:44

cap_nemo
Member
Registered: 2005-04-20
Posts: 33
Website

Re: [plugin] [ORPHAN] rss_google_map - display articles on google maps

If you click on the “View Large Map & Get directions” you’ll see the correct address in the query string, or you can click through to see it.

My goal here would be just to have ONE marker per article. I’m just not sure why the JS is generating 5 markers, which is how many ‘event’ articles are in that section. Currently only two articles have addresses associated to them and i think that’s why there is two visable markers. Is there anything we can do to keep it to one marker per article?

Thanks so much, Rob.

Offline

#10 2006-02-10 00:30:53

Liiint
Member
From: Tacoma, WA
Registered: 2004-10-01
Posts: 18
Website

Re: [plugin] [ORPHAN] rss_google_map - display articles on google maps

I’ve been wanting a plugin that does this exact thing. Thank you very much. I know that you’ve said you may be done playing with Google maps, but one feature would be most appreciated. It may be possible now, but I haven’t gotten it to work. Is it possible to put a link in the infowindow so that users can click back to the original article?

Thank you.

Offline

#11 2006-02-10 15:29:53

gdtroiano
Archived Plugin Author
From: Highland Park, NJ
Registered: 2005-01-29
Posts: 59
Website

Re: [plugin] [ORPHAN] rss_google_map - display articles on google maps

I’m trying to use the plugin to map location of places I’ve visited. Despite having different addresses for each article, the maps being generated are all of the same location—that is, the address associated with the first article.

Any ideas, anyone?

Offline

#12 2006-02-10 15:32:19

cap_nemo
Member
Registered: 2005-04-20
Posts: 33
Website

Re: [plugin] [ORPHAN] rss_google_map - display articles on google maps

Yeah, i’m actually having the same issues. I think it has something to do with the looping of the articles and creation of ‘marker’ points. I’m gonna try hacking around with it today. I’ll let you know what i find.

Offline

Board footer

Powered by FluxBB