I have been asked to add map support from one of any number of map APIs to a geographical display in our software. The display currently shows geographical coordinates, such as a series of GPS fixes; we'd like to show a map behind them. We use C++ Builder 2010 (and occasionally Delphi) so this is natively compiled software, not a web app.
The problem is many map APIs seem to work by you specifying a point, and the API returns a map of some size centred around that point. Google is the prime example: specify a centre and a size and scale (in pixels). This means that for the image you get back, you don't know the geolocation of the corner points of the image (unless I've missed something - that would be a good answer!) That means that you can't draw the image as the background to a geographical plot.
To explain it another way: the window has left and right borders of (say) 147 and 147.2 degrees east longitude; top and bottom borders of (say) 42.5 and 42.6 degrees south latitude. In order to fill that window with a map, you need to be able to request a map that encompasses the corner points of the window, and know the coordinates of the returned image(s) in order to render the image correctly.
So, I'm seeking SO's advice on a good map API that meets the following requirements:
- Allows a request that includes four corner points; return result has known coordinates for the image's corners
- Is easy to use from outside a web browser, in native code. To give you an idea, an API like Google's static image API is a great answer, it's easy to use and easy to handle the output; their Javascript API would be a terrible answer; their web services API would be acceptable, but requires processing JSON or XML so is harder than it needs to be.