I want to provide a map editor that allows us to:
center a map at a given coordinates and zoom level
lay out a set of way points on the map and calculate a route along them
mark Points of Interest along the way either by clicking at a point and getting the address or search for the point of interest and getting the lat/long
generate static thumbnails of the map that we can shared out.
save the maps and then reload them from search results later.
I reread the Google Maps API terms and it appears they've made some subtle changes which throws a wrench into my plans. Namely the following clause is causing me some grief:
"(b)
No Pre-Fetching, Caching, or Storage of Content.
You must not pre-fetch, cache, or store any Content, except that you may store: (i) limited amounts of Content for the purpose of improving the performance of your Maps API Implementation if you do so temporarily (and in no event for more than 30 calendar days), securely, and in a manner that does not permit use of the Content outside of the Service; and (ii) any content identifier or key that the Maps APIs Documentation specifically permits you to store. For example, you must not use the Content to create an independent database of "places" or other local listings information."
The net effect of this is that we can build a map, put points on it, but I am prevented from saving out the the data that represents the nice blue lines outlining the route. So if we use Google Maps, you would have to load the map and then press a Calculate Route button to see the actual route. Also, it looks like I would not be allowed to store any addresses generated by their geocoder and reverse geocoder as they specifically state.
Maybe I am too much of a stickler for the rules, but I really don't want to run afoul of Google's terms of service. I do take these things seriously. It would suck to build something only to have them terminate my account.
The terms also mean that if we lay out a route on a Google Map using their geocoding and routing engine, we would be prevented from exporting that for use on a GPS devices. So for the moment, we would only be able to export any points we laid out on the map ourselves and would have to let the GPS calculate the route between them.
Speaking of GPSs, I have most of the GPX importer built. This is the format used by Garmin to import and export routes. I've been working with a sample file Yun Lung Yang kindly gave me and it's turning out to be wicked easy.
I spent quite some time wondering whether or not we could build a successful site using only routes uploaded from GPS's. Unfortunately, route/trip planning is such a huge part of what we are trying to do here, so not being able to save out routes that were laid out on the map is simply a non-starter.
So I've started looking into alternatives. Google has by far the best maps out there. Other services, such as Bing and MapQuest have similarly restrictive terms for the use of their routing and geocoding data.
The most promising possibility I've found so far is a company called
Cloud Made:
CloudMade - The Location Platform Serving OEMs, Enterprises & Developers
CloudMade provides you with access to a range of innovative tools and APIs that allow you to make the most of all map data
http://cloudmade.com/
These guys use data provided by the Open Street Maps project and as a result any data generated by their API's is free to use for any purpose under a Creative Commons license. They even expressly allow saving out the map images. It looks like they have all the features we would need including Geo-Coding (Turning address into Lat/Long), Reverse-GeoCoding (turning a Lat/Long into an address), route calculations, markers, etc.
They also have a for-fee SDK available with data that can be installed on a smartphone to allow us to do off-line mapping which will be absolutely key for ADV riders out of range of cell signals.
What's nice is that they do have a Google Maps API compatibility layer so all the code I've written can be re-used. (In designing my code I did anticipate that I might have to replace the mapping engine and have set things up accordingly so we could, theoretically, support any number of mapping backends that we can switch out. )
I suspect the quality of the cloudmade routing and geocoding won't rival Google's, but maybe it will be a "good enough" for our purposes. The sample apps I've seen online rival what we see with Google, at least around well populated areas.
In order to use them, I would have to sign up for an account and give them a credit card, but at our current levels, it looks like it would be free for quite some time before we get to their minimum-for-fee levels.
So here's my thinking:
1. I'll finish up the Google Maps work that I'm doing but I just won't save out the routes, per their terms of service.
2. Those with Garmins or other sources of GPX data will be able to upload their GPS tracks and they will get saved.
3. We'll be able to mark points of interest on the maps.
4. We'll be able to mark waypoints for the routing engine to use.
5. For the time being, if you want to see the route in an already saved map, you'll have to click on the Calculate Route button.
Once I get that done and working, I'll build support for the Cloud Made API's, and we can start experimenting with them to see how well they work.
If you guys come across other mapping providers or see something I'm missing with regards to storing data from Google, Bing, MapQuest, et all, please let me know.