I’m nearly finished with a rather radical overhaul of the Map of Human Sexuality, and one of the things I thought would be cool to do with it would be to make it interactive.
What I’d like to be able to do is to place it on a Web page, then allow folks to stick push pins in it by clicking or dragging on it. Ideally, folks could also, if they wanted, save it with a name/password, and be able to link to their version of it.
What I have: PHP, Perl (though I’d prefer PHP), mySQL. I know there must already be code floating around out there somewhere that does the heavy lifting (records mouse clicks, places a graphic of a pin over another graphic, saves the array of pin locations in a database), so it’s be pretty silly to code it all from scratch. Plus, y’know, I’m not sure my PHP chops are up to it.
But I’m not finding anything.
Anyone know of any open source code or libraries that might be useful?
Might want to try using the Google Maps API – it has support for all the things you want. Try:
http://mapki.com/wiki/Add_Your_Own_Custom_Map
http://econym.googlepages.com/custommap.htm
http://www.maplib.net/
Sadly, as it turns out, my desired use violates the Google API Terms of Use, which forbid “adult” content or using the API on sites which host “adult” content.
So it looks like rolling my own is likely to be the only way to go.
Damn, that is quite unfortunate. I hope you can find a good alternative.
Might want to try using the Google Maps API – it has support for all the things you want. Try:
http://mapki.com/wiki/Add_Your_Own_Custom_Map
http://econym.googlepages.com/custommap.htm
http://www.maplib.net/
…and following up on‘s comment, there’s apparently a PHP Class that integrates with Google Maps:
http://www.systemsevendesigns.com/phoogle
…and following up on‘s comment, there’s apparently a PHP Class that integrates with Google Maps:
http://www.systemsevendesigns.com/phoogle
You might also just want to use one of the many excellent Javascript frameworks out there, like Jquery or Dojo.
You might also just want to use one of the many excellent Javascript frameworks out there, like Jquery or Dojo.
PHP = 300 or so lines of code
ColdFusion = 1 line of code
Yes, they actually have a tag just for what you are talking about.
Just sayin. 🙂
What’s the tag?
http://www.coldfusionguy.com/googlemaps/cf_gmap.htm
Nice!
But, it takes five lines of PHP, not 300. ;-P
Cool… cool..
My main point is still valid though.. 5 lines is more then 1. 🙂
The downside is that the ColdFusion tag is a wrapper for the Google Maps API, and the API Terms of Use forbid using it in an adult-related context. 🙁
But aren’t you using the API if you use PHP as well? I don’t see how it’s code related. 🙂
Yep. Which rules out using PHP to wrap the Google Maps API too.
What I need is code or a set of libraries to do this that doesn’t make use fo the Google Maps API and isn’t encumbered by any use restrictions at all. I know such code exists, there are many Web sites that have some variant of “click on a graphic to change it” going on. I’d prefer not to re-invent the wheel if I don’t need to, y’know?
I could do it in Flash, but I really would rather not go down that road.
I don’t know if this will have what you need, but Open Streetmaps seems to do a lot of what google maps does, and it seems to be all open source.
PHP = 300 or so lines of code
ColdFusion = 1 line of code
Yes, they actually have a tag just for what you are talking about.
Just sayin. 🙂
lol – are you making a voodoo doll of George Bush?
That wasn’t the plan, but Lordy, it’s a brilliant idea!
lol – are you making a voodoo doll of George Bush?
What’s the tag?
http://www.coldfusionguy.com/googlemaps/cf_gmap.htm
Nice!
But, it takes five lines of PHP, not 300. ;-P
Cool… cool..
My main point is still valid though.. 5 lines is more then 1. 🙂
That sounds pretty nifty. I’d love to do that.
I’d get more than one pin, right???
Of course! As many pins as you like. 🙂
That sounds pretty nifty. I’d love to do that.
I’d get more than one pin, right???
Sadly, as it turns out, my desired use violates the Google API Terms of Use, which forbid “adult” content or using the API on sites which host “adult” content.
So it looks like rolling my own is likely to be the only way to go.
The downside is that the ColdFusion tag is a wrapper for the Google Maps API, and the API Terms of Use forbid using it in an adult-related context. 🙁
That wasn’t the plan, but Lordy, it’s a brilliant idea!
But aren’t you using the API if you use PHP as well? I don’t see how it’s code related. 🙂
Yep. Which rules out using PHP to wrap the Google Maps API too.
What I need is code or a set of libraries to do this that doesn’t make use fo the Google Maps API and isn’t encumbered by any use restrictions at all. I know such code exists, there are many Web sites that have some variant of “click on a graphic to change it” going on. I’d prefer not to re-invent the wheel if I don’t need to, y’know?
I could do it in Flash, but I really would rather not go down that road.
Of course! As many pins as you like. 🙂
I don’t know if this will have what you need, but Open Streetmaps seems to do a lot of what google maps does, and it seems to be all open source.
I have an idea !
Why don’t you use one of those mapping programs that has a push-pin feature?
http://www.pushpin.com/
http://www.pushpinmap.com/
TMM
Re: I have an idea !
Sadly, they are pay-for-play services.
I have an idea !
Why don’t you use one of those mapping programs that has a push-pin feature?
http://www.pushpin.com/
http://www.pushpinmap.com/
TMM
Re: I have an idea !
Sadly, they are pay-for-play services.
Damn, that is quite unfortunate. I hope you can find a good alternative.
The Pragmatic Programmer’s guide to AJAX uses (as its first example) a how-to on building your own Google-maps alike. I grok that Google’s TOS doesn’t allow for use of Google’s stuff f’real, but rolling your own (or downloading the example from the Pragmatic Programmer’s example site) might work for you.
🙂
The Pragmatic Programmer’s guide to AJAX uses (as its first example) a how-to on building your own Google-maps alike. I grok that Google’s TOS doesn’t allow for use of Google’s stuff f’real, but rolling your own (or downloading the example from the Pragmatic Programmer’s example site) might work for you.
🙂
Y’know, I have no idea. The Facebook Developers Terms of Service requires you to log in before it can be seen, and I’m not on Facebook. (And how stupid is it to require login before you can see the ToS, anyway?)
Y’know, I have no idea. The Facebook Developers Terms of Service requires you to log in before it can be seen, and I’m not on Facebook. (And how stupid is it to require login before you can see the ToS, anyway?)