NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > Website Development Discussion Forums > Programming
Reload this Page Google Maps API simple things. . .need help

Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics.

Advanced Search


Closed Thread
 
LinkBack Thread Tools
Old 07-08-2008, 01:13 PM THREAD STARTER               #1 (permalink)
NamePros Regular
 
omegapandor's Avatar
Join Date: May 2008
Posts: 248
omegapandor has a spectacular aura aboutomegapandor has a spectacular aura about
 



Help! Google Maps API simple things. . .need help


I'm doing a google maps site. It's a game, oddly enough. Although the information I am looking for will definitely come in handy for anything else down the road.

I already have the basic stuff set up, including a map that reads from a drupal database (map isn't set up inside drupal yet, but I have edited drupal where users can set their address to be geocoded into the map).

So right now I am trying to figure out how to implement some things:

1. distance between 2 markers or user locations in the database (I can probably do this one myself with Haversine forumla but I don't know a good way to implement the inputs)
2. what country a marker is in (maybe not so simple, I guess?)
3. permanently moving a marker a limited distance without click-dragging
4. limited sight distance depending on zoom (for the case of tons of markers)
5. different stock marker icon color (but not custom image)

I'm just looking for some default-google-api friendly source code.
????: NamePros.com http://www.namepros.com/programming/490576-google-maps-api-simple-things-need.html

For now, I'm hoping a kind soul will help me with a least one of these things gratis or for advertisement or something. I would definitely be willing to put a non-adult non-gambling link in my sig for you for. . .say. . . until august or something.
__________________
Are you tired of viruses and popups? Use Firefox!
Last edited by omegapandor; 07-08-2008 at 01:26 PM.
omegapandor is offline  
Old 07-09-2008, 08:27 PM   #2 (permalink)
DNOA Member
Join Date: May 2004
Posts: 5,040
mholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant future
 


Autism Marrow Donor Program 9/11/01 :: Never Forget Multiple Sclerosis Adoption Alzheimer's Lou Gehrig's Disease (ALS)
These things are awesome... just View Source on these examples and you can probably step yourself through the Javascript enough to add it to your site:
????: NamePros.com http://www.namepros.com/showthread.php?t=490576

http://code.google.com/apis/maps/doc...tion/examples/

There are some more advanced things that you want to do, which the API may not be able to do for you (but I'm not too experienced w/ it so I wouldn't really know)... for example, find out what country a marker is in.

Your thing #1 may be provided by the API (with a little tweaking), however you might dissect this: http://www.daftlogic.com/projects-go...calculator.htm

Good luck!
mholt is offline  
Old 07-09-2008, 09:17 PM THREAD STARTER               #3 (permalink)
NamePros Regular
 
omegapandor's Avatar
Join Date: May 2008
Posts: 248
omegapandor has a spectacular aura aboutomegapandor has a spectacular aura about
 



Thanks. I actually new about daftlogic - that site served as a major inspiration as far as the decision to use google maps goes. It had only occurred to me about a day ago that I could view the source of many google maps on the net. Unfortunately for me, daft logic seems to use some method to hide the map api code.

I have found a distance example on another site and used its source. The accuracy seems ok for short distances, and the function is built-in.
wisgary distance calculator
????: NamePros.com http://www.namepros.com/showthread.php?t=490576


I forgot about the code.google.com examples! Thanks.

Right now my major problem is trying to get a php script to run via javascript. There seems to be some kind of "fake image" trick, but it isn't working for me.

Um. . . Thanks for the reply. . .Rep added!
__________________
Are you tired of viruses and popups? Use Firefox!
omegapandor is offline  
Old 07-09-2008, 09:33 PM   #4 (permalink)
DNOA Member
Join Date: May 2004
Posts: 5,040
mholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant futuremholt has a brilliant future
 


Autism Marrow Donor Program 9/11/01 :: Never Forget Multiple Sclerosis Adoption Alzheimer's Lou Gehrig's Disease (ALS)
Originally Posted by omegapandor
Thanks. I actually new about daftlogic - that site served as a major inspiration as far as the decision to use google maps goes. It had only occurred to me about a day ago that I could view the source of many google maps on the net. Unfortunately for me, daft logic seems to use some method to hide the map api code.

I have found a distance example on another site and used its source. The accuracy seems ok for short distances, and the function is built-in.
????: NamePros.com http://www.namepros.com/showthread.php?t=490576
wisgary distance calculator


I forgot about the code.google.com examples! Thanks.

Right now my major problem is trying to get a php script to run via javascript. There seems to be some kind of "fake image" trick, but it isn't working for me.

Um. . . Thanks for the reply. . .Rep added!
Thank you!

Regarding:

Quote:
Right now my major problem is trying to get a php script to run via javascript.
Learn how to use the XMLHttpRequest object in Javascript. That's the basis for the AJAX thinking, which can run PHP from Javascript. http://www.w3schools.com/ajax/ajax_intro.asp
mholt is offline  
Old 07-09-2008, 10:52 PM THREAD STARTER               #5 (permalink)
NamePros Regular
 
omegapandor's Avatar
Join Date: May 2008
Posts: 248
omegapandor has a spectacular aura aboutomegapandor has a spectacular aura about
 



Yeah, I figured I'd have to learn it sooner or later. I was hoping there was some kind of shortcut, because I looked at the principles of AJAX and it seemed like a lot for me at the moment, especially for what I'm trying to do. I guess I'll just have to man up and learn that object.


AJAX = in the long run, anyway, I suppose.

Thanks for the link. Although to be honest. . .w3schools has been in my bookmarks toolbar for quite some time.
__________________
Are you tired of viruses and popups? Use Firefox!
omegapandor is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


Liquid Web Smart Servers  
All times are GMT -7. The time now is 09:37 AM.

Managed Web Hosting by Liquid Web
Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger