How can I use an OpenStreetMap service (an online server) to programmatically fetch a street map image, as a downloadable image file, from just a latitude–longitude value and zoom factor?
My application has a set of latitude–longitude values, and for each one I need an OpenStreetMap diagram – an image, not a web page – showing the location with a pin on the street map. The image needs to be a single SVG or PNG for further offline processing.
How can I programmatically construct a URL (at e.g. http://www.openstreetmap.org/ or http://www.opencyclemap.org/ or a similar service), parameterised by the latitude–longitude value and perhaps a zoom factor, that will return just the map image I'm interested in, including a pin at the location specified?