[OSM-dev] Creating Easy Map Embedding

Christopher Schmidt crschmidt at metacarta.com
Mon Oct 22 14:43:23 BST 2007

(This is a summary of a discussion that was had on IRC earlier today.
Much of this content has also been put into a wiki page at
http://wiki.openstreetmap.org/index.php/Creating_Easy_Map_Embedding .)

Google Maps offers an iframe based embedding solution. It seems like 
adding something similar to OSM might increase adoption, or at least
awareness, of the project, but there are a number of social and
technical hurdles that would block such adoption.
It would be possible to create an OpenLayers-based static HTML page
which can act as an iframe. This page would be static HTML, and would
not require much in the way of server resources to actually serve.
Here is a simple example:

<iframe width="425" height="350" frameborder="0" 
scrolling="no" marginheight="0" marginwidth="0" 

Drop this into any web page to get a simple map view. (You can see it in
action on my mapping page: http://crschmidt.net/mapping/.)

The embed.html page is pure Javascript -- no server side -- and can be
grabbed and redeployed anywhere under the same license terms as

There is a concern that the current OSM infrastructure is not designed
for making tiles available to everyone who wants them. With this being
the case it is important to solve this technical hurdle before deploying
the service: the biggest part of that solution for the Mapnik tiles is
going to be the move to mod_tile that jburgess (and others?) is/are
working on, I believe? 

There are additional social hurdles:
 * Does OSM want to serve tiles to J. Random Developer for embedding into
   his website? 
 * What happens if someone popular embeds a map -- is there a limit to
   the number of tiles served per referrer per day? (OSM, unlike Google,
   doesn't have infinite hardware.)
    * Unlike Google, OSM has information available on 'how to roll your
      own'. With that in mind, it's possible to use the 'set up your own if
      you want to have a lot of load' response to anyone who is likely to
      exceed the limit.

Clearly, solving the technical hurdles to make OSM's infrastructure are
important before something like this becomes available -- but my
question is, "Is there some reason that I haven't thought of that this
might be a bad idea?" If the answer to that is 'No', then my next
question is "Is there any particular features that would make this a
better idea -- something missing that shoul be added first?"  

Interested in any feedback, positive or negative.

Christopher Schmidt

More information about the dev mailing list