[BETA] Phoogle (Google) Map

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment! No new topics are allowed in this forum.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: MOD Development Forum rules

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.
aussiewal
Registered User
Posts: 169
Joined: Tue Nov 14, 2006 5:47 am
Location: Sydney, Australia

Post by aussiewal »

BassFace wrote: Thanks for the kind words! I've got the lat/long working! YEAH! :D Just need to add it to the admin pages (the ones I forgot about before :roll: ).

The code has gotten pretty ugly, so I'm gonna try to clean it all up before I release the update. Also, I've had to change some of the existing code, so this will not be an 'update', rather a complete new version. According to the phpbb MOD versioning system, this release will be ver 0.1.0. So unfortunately all of you who have installed the MOD will have to uninstall it, then re-install this new version.

This isn't as hard as it sounds if you have a text editor with a find function (better than WordPads, that is). You just go through the install file and paste the new code bits into the 'find' feature, and then delete it from the modded phpbb files. Delete the added files, and you are done! Remember to save your Google API Key before you delete the phoogle_map.php file!!!! 8O

So I'll release the new version in a few days, once I clean it all up again and test it for any new wierdness.


Awesome, thanks...

Yes, I use a text editor, I don't use wordpad, that just confuses me.

Plus...

I still have the original files I moded in a folder so I can just put them back into production, and start again.

I will wait with baited breath for the upgrade, again you are awesome.

I need to buy you a beer or three.

On a side note, I still can't get the address part to work, I have 3 USA members who have their address in there and still a blank table, no map.

One example is Amarillo, TX 79109 displays a blank box

Have decided to remove phoogle maps form our site as now I constantly get a gray box, no maps at all,

Also, if someone puts more that 25 characters in the bubble text, it gets errors.


Will
User avatar
BassFace
Registered User
Posts: 783
Joined: Tue Dec 02, 2003 7:10 pm
Location: Aurora, CO

Post by BassFace »

Hmmm, I'll have to look into the bubble text length problem.

As far as the address: There are a number of ways to send the address to the geocoder, and at this point the MOD uses either the whole address (ie. 1234 Main St. Anytonwn, ST 54321) or as a lat/long pair.

The geocoder can accept City, ST Zip format, but it needs to be sent to the geocoder differently. I'll look into changing that, or if there's a way to check the format the user is inputting. It may come down to adding fields in the Profile for Address, City, State, Zip, Country instead of one Address field.

I'm also pretty sure now that I'm gonna store the address in the db, but only use the lat/long for the map display. This will take the load off the geocoder and hopefully speed up the map display for large numbers of users.
aussiewal
Registered User
Posts: 169
Joined: Tue Nov 14, 2006 5:47 am
Location: Sydney, Australia

Post by aussiewal »

BassFace wrote: Hmmm, I'll have to look into the bubble text length problem.

As far as the address: There are a number of ways to send the address to the geocoder, and at this point the MOD uses either the whole address (ie. 1234 Main St. Anytonwn, ST 54321) or as a lat/long pair.

The geocoder can accept City, ST Zip format, but it needs to be sent to the geocoder differently. I'll look into changing that, or if there's a way to check the format the user is inputting. It may come down to adding fields in the Profile for Address, City, State, Zip, Country instead of one Address field.

I'm also pretty sure now that I'm gonna store the address in the db, but only use the lat/long for the map display. This will take the load off the geocoder and hopefully speed up the map display for large numbers of users.


Hey Will

Thanks for the information, it does expalin what is happening to a certain degree. I might remove the address option from the profile, and force them to put in the coordinates as every address our members put in, causes the table where the map should dispaly produce a blank gray box.

Currently if you click on ther Phoogle Map link up the top on our site, you get a gray box every time.

But if you click on the link in the members profile, or in there post, it seems to work if they have the coordinates but if they have an address, you get the gray box.

For security reasons a lot of members do not want to display there exact address, hence I think the coordinates is a better option.

Hope the above makes sense.

I'm will be happy if the find your long/Lan link works so it populates the profile with the coordinates.

Thats will keep our members from sending me irate emails.

Again thanks, this is going to be awesome once the bugs are out

Will
aussiewal
Registered User
Posts: 169
Joined: Tue Nov 14, 2006 5:47 am
Location: Sydney, Australia

Post by aussiewal »

Damn....

I can't work out what is causing my map not to show up when you click on the Phoogle Map ink up the top.

AHHHHHH!
User avatar
BassFace
Registered User
Posts: 783
Joined: Tue Dec 02, 2003 7:10 pm
Location: Aurora, CO

Post by BassFace »

If ANY of the users have a bad address, it'll cause the 'main' (all users) map to break! :evil: They all need to be good...

Yet another bug to fix ! 8O :D
aussiewal
Registered User
Posts: 169
Joined: Tue Nov 14, 2006 5:47 am
Location: Sydney, Australia

Post by aussiewal »

BassFace wrote: If ANY of the users have a bad address, it'll cause the 'main' (all users) map to break! :evil: They all need to be good...

Yet another bug to fix ! 8O :D


Hey Dude (Will)

Awesome, Thanks, I found the problem.

I hope you are getting some free time dude, don't spend all your free time on this.

Well, I'm off for a surf.....

Will
aussiewal
Registered User
Posts: 169
Joined: Tue Nov 14, 2006 5:47 am
Location: Sydney, Australia

Post by aussiewal »

Hey Dude (Will)

Would appreciate if you could advise when you will be releasing to new version of this mod.

I'm going to have to remove the current version from our website because it is causing major problems as it is now.

I'm spending hours correcting peoples errors in their coordinates or addresses, just spent 4 hours going through the database and can't find any errors causing the empty gray box.


Will
User avatar
BassFace
Registered User
Posts: 783
Joined: Tue Dec 02, 2003 7:10 pm
Location: Aurora, CO

Post by BassFace »

Sorry about that, man! :evil: I'll get you a 'fix' tomorrow or Monday. I don't think you can remove the address fields from the Profile pages cuz it would mess up the database queries. I think I'll just pull the address field from the profile for the next release - the geocoder is just not reliable enough for international addresses and I haven't been able to find a way to gracefully handle the errors.
I'm trying to make it so the address field is there for the location lookup (in the new "Find My Coordinates" map) but I will not store them - they will be converted to lat/long and stored that way - thus eliminating the need for geocoding for the normal map displays.

Thanks for hanging in there with me! Removing the maps may be best for now unless you can get your users to just add lat/long instead of addresses.
aussiewal
Registered User
Posts: 169
Joined: Tue Nov 14, 2006 5:47 am
Location: Sydney, Australia

Post by aussiewal »

BassFace wrote: Sorry about that, man! :evil: I'll get you a 'fix' tomorrow or Monday. I don't think you can remove the address fields from the Profile pages cuz it would mess up the database queries. I think I'll just pull the address field from the profile for the next release - the geocoder is just not reliable enough for international addresses and I haven't been able to find a way to gracefully handle the errors.
I'm trying to make it so the address field is there for the location lookup (in the new "Find My Coordinates" map) but I will not store them - they will be converted to lat/long and stored that way - thus eliminating the need for geocoding for the normal map displays.

Thanks for hanging in there with me! Removing the maps may be best for now unless you can get your users to just add lat/long instead of addresses.


Awesome, thanks buddy

I have already removed it from our forum, and have received a few irate emails but hey... You can't please everyone.

Will
User avatar
BassFace
Registered User
Posts: 783
Joined: Tue Dec 02, 2003 7:10 pm
Location: Aurora, CO

Post by BassFace »

Just a general progress report.

I found out (from another php google map api class author) that the Yahoo Geocoder does not handle international address, US only. So I've been working on integrating the Google geocoder.

I've got the location (lat/long) lookup map working with the google geocoder, but not with the main map/class. The lookup map is a standalone 'popup' where the user can enter an address or pan/zoom on the map to get their lat/long, which will be sent and saved in the phpbb profile. This should eliminate the blank map errors which were caused by bad addresses that the geocoder could not find.

More to come...
User avatar
BassFace
Registered User
Posts: 783
Joined: Tue Dec 02, 2003 7:10 pm
Location: Aurora, CO

Post by BassFace »

OK, I've got it all working now and tested in IE 6 and FireFox. The lookup map (the new map for users to find their location) is using the Google Geocoder for converting typed-in addresses to lat/long. The 'real' map no longer uses addresses at all, just the stored lats/longs! Once the user finds his/her location with the lookup map, the lat/long gets transfered to their Profile and that is what gets stored in the db. And if the geocoder can't find the address, it gets handled gracefully with a popup error and then the user can drag/zoom-in on the lookup map and get their lat/long that way.

Soooo, hopefully this will mean less problems with international addresses (which the Yahoo geocoder previously used allegedly couldn't do) and it should totally eliminate the dreaded 'gray map syndrome' completely.

I've got the install file all updated, just need to run through it on a clean install of phpbb to check for errors. Then I can release it again as phpbb_phoogle_map BETA v0.0.3.

Check back this weekend (1/21/2007) for the update to be posted! :D
aussiewal
Registered User
Posts: 169
Joined: Tue Nov 14, 2006 5:47 am
Location: Sydney, Australia

Post by aussiewal »

BassFace wrote: OK, I've got it all working now and tested in IE 6 and FireFox. The lookup map (the new map for users to find their location) is using the Google Geocoder for converting typed-in addresses to lat/long. The 'real' map no longer uses addresses at all, just the stored lats/longs! Once the user finds his/her location with the lookup map, the lat/long gets transfered to their Profile and that is what gets stored in the db. And if the geocoder can't find the address, it gets handled gracefully with a popup error and then the user can drag/zoom-in on the lookup map and get their lat/long that way.

Soooo, hopefully this will mean less problems with international addresses (which the Yahoo geocoder previously used allegedly couldn't do) and it should totally eliminate the dreaded 'gray map syndrome' completely.

I've got the install file all updated, just need to run through it on a clean install of phpbb to check for errors. Then I can release it again as phpbb_phoogle_map BETA v0.0.3.

Check back this weekend (1/21/2007) for the update to be posted! :D


Hey Will

Awesome...... You are a God!

I have been getting a lot of emails asking, " When will the map be back...." Yesterday it filled my inbox.

I can't wait to test it out. Whooooo Hoooooo! weeeeeeee!

Will
Shrubbn
Registered User
Posts: 10
Joined: Sun Jan 14, 2007 7:15 pm

Post by Shrubbn »

aargh :x can't seem to make it work... I'm getting these errors everywhere

Code: Select all

Could not query users

DEBUG MODE

SQL Error : 1054 Unknown column 'user_phoogle_address' in 'field list'

SELECT username, user_id, user_phoogle_address, user_phoogle_latitude, user_phoogle_longitude, user_phoogle_comment FROM phpbb_users WHERE user_id <> -1

Line : 95
File : phoogle_map.php

 
I don't know what I did wrong :?
User avatar
ewelin
Registered User
Posts: 262
Joined: Fri May 21, 2004 2:13 pm
Location: MA, USA
Contact:

Post by ewelin »

Excelent... I've been looking forward to another google maps mod. I have the Atlast MOD installed but support on that one has gone MIA. Any chance we could see some screen shots of the ACP? It also looks like you can customize the image by simply replacing the smiley.png image, is that correct?

As for the Atlas mod not working that's due to the fact it uses the original API interface and that is no longer avaiable.

Also... any chance the username within the map-bubble could link to the user's profile?
aussiewal
Registered User
Posts: 169
Joined: Tue Nov 14, 2006 5:47 am
Location: Sydney, Australia

Post by aussiewal »

Shrubbn wrote: aargh :x can't seem to make it work... I'm getting these errors everywhere

Code: Select all

Could not query users

DEBUG MODE

SQL Error : 1054 Unknown column 'user_phoogle_address' in 'field list'

SELECT username, user_id, user_phoogle_address, user_phoogle_latitude, user_phoogle_longitude, user_phoogle_comment FROM phpbb_users WHERE user_id <> -1

Line : 95
File : phoogle_map.php

 
I don't know what I did wrong :?


Hey Dude

The current version is not stable enough for production, I would wait until version 0.0.3

Will
Post Reply

Return to “[2.0.x] MODs in Development”