Originally Posted by
Redrobes
Its a lot zippier now. Maybe it was just overloaded. But that does bring up a good point. The existing maps are all Guild internal. Would we want to have 3rd party web site stuff on the members map.
Well, it's possible to run a map service that could be used in place of the OSM Mapnik layer using software like GeoServer or MapServer, and there are various alternatives like Tiles@home, Cloud Made, Bing, and Google. You can even have several and let the user pick. Cloud Made, Bing, and Google all require signing up for API keys, which is why I've stuck to the OSM Mapnik layer so far.
I guess we should also know something else, we have a form based web page to ask the user for their ID and location coord and store that on the guild site. How would we enter new members coords into the new system. Do we format up a new text file when a new member adds and the new map page will look to that file and put all the pins in as required. Whats the process that the OpenLayers needs / Are you able to post a sample GeoJSON file with two peoples locations put in and I'll see if I can get the old script to make one of them up for you. Then we can have both types of members map at the same time.
GeoJSON is pretty simple, this is what I used for the first example.
Code:
{ "type": "FeatureCollection",
"features": [
{"type":"Feature", "geometry": {"type":"Point", "coordinates":[-79.1, 43.1]}, "properties":{"username":"RobA", "avatar":"http://www.cartographersguild.com/customavatars/avatar768_40.gif"}},
{"type":"Feature", "geometry": {"type":"Point", "coordinates":[-123.66, 48.784]}, "properties":{"username":"Hai-Etlik", "avatar":"http://www.cartographersguild.com/customavatars/thumbs/avatar9958_2.gif"}},
{"type":"Feature", "geometry": {"type":"Point", "coordinates":[0, 51.51]}, "properties":{"username":"ravells"}}
]
};
It's really just a nested set of javascript hash tables with a bunch of constraints on how they are arranged.
It can either be embedded directly in the page with the map (as I've done with my demos), or loaded via AJAX. The properties section is pretty much freeform tagged data. I've got "username" and "avatar" but it could be any data the generating script can provide. I've dropped the avatar property from ravells' entry to demonstrate.