Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/Code)
 Member Map
 New Topic  Reply to Topic
 Printer Friendly
Previous Page | Next Page
Author Previous Topic Topic Next Topic
Page: of 3

muzishun
Senior Member

United States
1079 Posts

Posted - 17 August 2005 :  12:52:06  Show Profile  Visit muzishun's Homepage  Reply with Quote
That's something I'll definitely need. Since we're still a pretty small forum, well over half of our members are located in one city.<

Bill Parrott
Senior Web Programmer, University of Kansas
Co-Owner and Code Monkey, Eternal Second Designs (www.eternalsecond.com)
Personal Website (www.chimericdream.com)
Go to Top of Page

sr_erick
Senior Member

USA
1318 Posts

Posted - 17 August 2005 :  14:00:07  Show Profile  Visit sr_erick's Homepage  Send sr_erick a Yahoo! Message  Reply with Quote
Maybe the solution is to have multiple people per pop up balloon. I can't really think of a better way than to vary the coordinates ever so slightly but that would get messy.<




Erick
Snowmobile Fanatics

Go to Top of Page

jeffery
Junior Member

USA
176 Posts

Posted - 17 August 2005 :  16:59:58  Show Profile  Reply with Quote
That is an issue for me too. Is it possible to add entries to the city database which specify address? You would only need the actual addresses/coordinates of the member. Then when they match,which they will, viola, the pin will be on those coordinates.<

www.thomasforum.com

Edited by - jeffery on 17 August 2005 17:01:27
Go to Top of Page

muzishun
Senior Member

United States
1079 Posts

Posted - 23 August 2005 :  12:47:48  Show Profile  Visit muzishun's Homepage  Reply with Quote
I'm having problems with the JOIN statement. I have an Access database, and it says the JOIN isn't supported. Does anyone else have this working on Access? I have tried making a couple changes, just to see if they worked, but no dice. Here's the statement:

strSQL = "SELECT DISTINCT " & qTop & " M_NAME, Member_ID, M_CITY, M_STATE, Latitude, Longitude, M_LASTHEREDATE, M_PHOTO_URL " & _
	"FROM " & strTablePrefix & "MEMBERS LEFT JOIN " & strTablePrefix & "GEOCODED_CITIES ON (M_CITY = CITY AND M_STATE = STATE) " & _
	"WHERE M_STATUS = 1 "
strSQL = strSQL & "AND M_CITY <> '' AND M_STATE <> '' AND M_COUNTRY = 'USA' "

if Len(qState) = 2 Then 
	le = Left(qState, 1)
	ri = Right(qState, 1)
	' Make sure they are chars
	if (ASC(le) >= 65 AND ASC(le) <= 90) AND (ASC(ri) >= 65 AND ASC(ri) <= 90) Then	
		qState 	= " AND M_STATE = '" & qState & "' "
		qLHD 	= "" ' it don't matter when they were here last
	Else
		qState = ""
	End If
Else
	qState = ""
End If

strSQL = strSQL & " " & qState 	& " "
strSQL = strSQL & " " & qLPD 	& " " 
strSQL = strSQL & " " & qLHD 	& " "
strSQL = strSQL & " " & qMID 	& " "
strSQL = strSQL & " ORDER BY M_LASTHEREDATE DESC, M_NAME ASC"


Got it working just after I posted this. Here's the code that worked, for anyone who has the same problem.


strSQL = "SELECT DISTINCT " & qTop & " M_NAME, Member_ID, M_CITY, M_STATE, Latitude, Longitude, M_LASTHEREDATE, M_PHOTO_URL " & _
	"FROM " & strTablePrefix & "MEMBERS AS M LEFT JOIN " & strTablePrefix & "GEOCODED_CITIES AS G ON (M.M_CITY = G.CITY AND M.M_STATE = G.STATE) " & _
	"WHERE M_STATUS = 1 "
strSQL = strSQL & "AND M_CITY <> '' AND M_STATE <> '' AND M_COUNTRY = 'USA' "

if Len(qState) = 2 Then 
	le = Left(qState, 1)
	ri = Right(qState, 1)
	' Make sure they are chars
	if (ASC(le) >= 65 AND ASC(le) <= 90) AND (ASC(ri) >= 65 AND ASC(ri) <= 90) Then	
		qState 	= " AND M_STATE = '" & qState & "' "
		qLHD 	= "" ' it don't matter when they were here last
	Else
		qState = ""
	End If
Else
	qState = ""
End If

strSQL = strSQL & " " & qState 	& " "
strSQL = strSQL & " " & qLPD 	& " " 
strSQL = strSQL & " " & qLHD 	& " "
strSQL = strSQL & " " & qMID 	& " "
strSQL = strSQL & " ORDER BY M_LASTHEREDATE DESC, M_NAME ASC"
<

Bill Parrott
Senior Web Programmer, University of Kansas
Co-Owner and Code Monkey, Eternal Second Designs (www.eternalsecond.com)
Personal Website (www.chimericdream.com)

Edited by - muzishun on 23 August 2005 12:55:47
Go to Top of Page

jeffery
Junior Member

USA
176 Posts

Posted - 24 August 2005 :  13:40:37  Show Profile  Reply with Quote
CarKnee,

I am trying to create a member list on the same page then when a member name is clicked on it pops the info window and zooms in on that user. But I don't understand javascript well enough. How would I create a link in membermap.asp which will zoom the map on a particular maerker and pop up the info window? Any hep would be appreciated. Thx. Btw I've been searching at the googe map api forum but unable to comprehend it fully still.<

www.thomasforum.com
Go to Top of Page

bitwise2000
Starting Member

38 Posts

Posted - 25 October 2005 :  14:54:31  Show Profile  Reply with Quote
I took a slightly different approach to this. I run an international forum, so limiting mapping to US only was not something I wanted to do.

Geocoding is problematic, especially with international locations. So, instead of trying to do lookups, my users enter their lat/lon directly. I use the marital status field in the members table to hold lat and lon delimited by a comma (and of course I modified the profile page and elsewhere to say "Geocode" instead of "Marital Status") This also gets around the need to geocode on-the-fly either from a local DB or via the web.

I point my users to a free reliable geocoder and have them paste the resulting lat/lon into their profile. They can be as accurate or vague as they want, using a post office or their exact street address. (I use the exact coordinates taken at the end of my driveway with a handheld GPS receiver and GMaps puts the pin on the exact spot. Very cool.)

That geocoder also has a REST interface, so I could have tried to auto-fill that field with a lookup, but again, it's not reliable due to duplicate place names, spelling errors, etc. (In any given good-sized country, there are hundreds of duplicate place names.). Some of my members also like to specify their locations as "Beautiful XYZ" or whatever, and they can still do that as long as their lat/lon is correct.

I deliver the XML to the browser in a way very similar to CarKnee's mod.

I also have a clickable sidebar. I just put the map up last weekend, so only 66 of my 1500+ members have filled in their geocode. Also, this method makes appearing on the map optional.

Have a look and steal my javascript if you like. I'll be making the map members-only soon, so if you don't see it before that happens, email me for the js code.

http://www.penturners.org/forum/membermap.asp


<
Go to Top of Page

stwilson
Junior Member

USA
385 Posts

Posted - 19 December 2005 :  22:32:24  Show Profile  Visit stwilson's Homepage  Reply with Quote
quote:
Originally posted by sr_erick

Ok, a small concern. I'm thinking of a way to work around something I found. If two people are in the same city (the exact same coordinates), the last one in the XML file is the one that is listed on the map. I wonder what should happen when this happens? How can we get multiple people per city?


Has anyone solved this issue yet? I have multiple members in the same zip codes all over the place. I rolled out the map yesterday and already today the problem of two members in the same zip code has surfaced. Anyone have a fix for this?<

Shannon
RidingArizona.com
Go to Top of Page

-gary
Development Team Member

406 Posts

Posted - 19 December 2005 :  23:27:31  Show Profile  Reply with Quote
Because of international members and the overhead of doing zip code lookups, I just store the Lat/Lon in the member table and give the users a point-and-click map to pick their location. It uses US zip codes to look up the default position, then they can select something more specific.

Doesn't quite solve the problem unless they do pick another point though.<

KawiForums.com


Go to Top of Page

stwilson
Junior Member

USA
385 Posts

Posted - 21 December 2005 :  00:30:16  Show Profile  Visit stwilson's Homepage  Reply with Quote
Thanks for the reply Gary. I solved it the same way. I created a separate Google map that allows them to mark their location. After marking their location they click on their marker again and it shows the geocode. They then add that to their profile and all is good. They are much less likely to have two points on the exact same location. Problem solved.<

Shannon
RidingArizona.com
Go to Top of Page

muzishun
Senior Member

United States
1079 Posts

Posted - 21 December 2005 :  10:58:06  Show Profile  Visit muzishun's Homepage  Reply with Quote
Would either of you be interested in sharing some of that code? I haven't had a chance to play with Google Maps much, but the ability to let users get their lat and long by typing their ZIP and entering it separately could be very useful.<

Bill Parrott
Senior Web Programmer, University of Kansas
Co-Owner and Code Monkey, Eternal Second Designs (www.eternalsecond.com)
Personal Website (www.chimericdream.com)
Go to Top of Page

jeeper
Starting Member

34 Posts

Posted - 19 January 2006 :  03:22:27  Show Profile  Reply with Quote
quote:
Originally posted by CarKnee

This mod was created to display the location of members on a Google Map.




Awesome idea. Although mine won't display the map. My api code is good, the google demo map works fine. I went through and edited all the members to made sure they say USA for country. Won't display.. no red x, nothing.. any ideas?

http://www.airzonabackcountry.com/
login/pass: test<
Go to Top of Page

imweazel
Starting Member

49 Posts

Posted - 19 January 2006 :  08:11:11  Show Profile  Reply with Quote
Did you sign up for your key? The map uses a different key for every site, you can get yours at http://www.google.com/apis/maps/.
<
Go to Top of Page

jeeper
Starting Member

34 Posts

Posted - 19 January 2006 :  15:09:35  Show Profile  Reply with Quote
quote:
Originally posted by imweazel

Did you sign up for your key? The map uses a different key for every site, you can get yours at http://www.google.com/apis/maps/.




Is that different then the Api map code? this type of map works fine.
http://www.airzonabackcountry.com/atvforum/phoenix.htm
I told google to register www.airzonabackcountry.com/atvforum
Should I have left the atvforum part out of it?<
Go to Top of Page

imweazel
Starting Member

49 Posts

Posted - 19 January 2006 :  19:27:51  Show Profile  Reply with Quote
Re-read the instructions, you need to register your site and obtain a key from Google Maps, your site address is used in making the key, then put the key into your membermap.asp such as the one listed below in bold.

'############################################################################################################
'# #
'# Script to generate a Google Member Map #
'# #
'# Created By CarKnee Consulting (www.carknee.com) on 8/15/05 #
'# Demo at http://www.rswarrior.com/forums/membermap.asp #
'# #
'############################################################################################################
%>
<!--#INCLUDE FILE="config.asp"-->
<!--#INCLUDE FILE="inc_sha256.asp"-->
<!--#INCLUDE FILE="inc_header.asp" -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<script src="http://maps.google.com/maps?file=api&v=1&key=ABQIAAAALht-dcusCNKFsEiqQ6vqXBR33tw3RAqyfxZH0WTBLWDofOKi8RT77oNBHiEtP5QKlVfgn_B_o0REiQ" type="text/javascript"></script>
<
Go to Top of Page

jeeper
Starting Member

34 Posts

Posted - 20 January 2006 :  00:44:44  Show Profile  Reply with Quote
quote:
Originally posted by imweazel

Re-read the instructions, you need to register your site and obtain a key from Google Maps, your site address is used in making the key, then put the key into your membermap.asp such as the one listed below in bold.

'############################################################################################################
'# #
'# Script to generate a Google Member Map #
'# #
'# Created By CarKnee Consulting (www.carknee.com) on 8/15/05 #
'# Demo at http://www.rswarrior.com/forums/membermap.asp #
'# #
'############################################################################################################
%>
<!--#INCLUDE FILE="config.asp"-->
<!--#INCLUDE FILE="inc_sha256.asp"-->
<!--#INCLUDE FILE="inc_header.asp" -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<script src="http://maps.google.com/maps?file=api&v=1&key=ABQIAAAALht-dcusCNKFsEiqQ6vqXBR33tw3RAqyfxZH0WTBLWDofOKi8RT77oNBHiEtP5QKlVfgn_B_o0REiQ" type="text/javascript"></script>




I reregisted using just the main site. Same problem.. so just for the hell of it I renamed the membermap.asp to .htm and the google map loads but doesn't show any points on it. so it seems likes its a coding error. Anyone else runing mysql? anything I need to tweak in the code?

http://www.airzonabackcountry.com/atvforum/membermap.htm
(displays the map)
http://www.airzonabackcountry.com/atvforum/membermap.asp
(map doesn't show up)<
Go to Top of Page
Page: of 3 Previous Topic Topic Next Topic  
Previous Page | Next Page
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.12 seconds. Powered By: Snitz Forums 2000 Version 3.4.07