[OSM-dev] GSoc Idea Statics Map API

Milo van der Linden milovanderlinden at gmail.com
Tue Mar 24 23:48:36 GMT 2009


Maybe even simpeler and more dynamic mapwise would be:

- Set up a wms server like mapserver (cgi-bin) somewhere on the globe. 
(Well documented)

- Create a virtual layer that lets mapserver connect to a openstreetmap 
tileserver
This is the only hard part since it involves calculating the bounds, 
pixel dimensions, lower left bound and upper right bound

- Let mapserver do the stitching and possibly; reprojecting to another 
coordinate system (standard functionality of mapserver)
- Have mapserver server the resulting image through a wms request with 
the required dimensions (standard functionality of mapserver)

This takes no client configuration what so ever, just constructing the 
right url to call mapserver. All possible requests are well documented 
on the website of the opengeospatial consortium.

Sounds really future safe to me too.

Andy Deakin wrote:
> I wrote a php+gd image stitcher in php a year or so ago as a proof of 
> concept. It was meant for showing the position of a vehicle on the 
> center of a ~300px square image for a mobile phone screen.
>
> It creates a matrix of osm images (size based on the final image 
> dimensions) which it either downloads from osm tiles servers or local 
> cache, and stitches them together. It then crops the image to required 
> size around a central focal point (suppled lat and long). It adds a push 
> pin or other image to the center of the image and also adds attribution 
> to the image.
>
> If anyone is interested, I can stick the source online. It might need a 
> bit of cleaning up.
>
> I'm not sure downloading 4+ tiles from osm and stitching them together 
> in php is really the way forward in a production environment, but it is 
> quick and easy.
>
> Andy
>   
>> A much simpler way of implementing something like this, though, is to  
>> just stitch together the existing tiles, like Patrick mentions. That  
>> way you don't have to do intensive rendering, you simply load in 4 (or  
>> more) existing images and stitch them together. You can still then  
>> overlay markers and do stuff like that, you wouldn't be able to do  
>> custom styles but that doesn't seem to be part of the requirement.  
>> This method saves you having to worry about different styles of map in  
>> the static API, so you wouldn't have to keep config files up to date  
>> or anything like that, but also allows you to serve any tiles through  
>> the same method.
>>
>> FYI, that's how Multimap's API works, don't know about Google but I  
>> imagine it's similar.
>>
>>   
>>     
>
> _______________________________________________
> dev mailing list
> dev at openstreetmap.org
> http://lists.openstreetmap.org/listinfo/dev
>
>   





More information about the dev mailing list