[OpenLayers-Users] Noob - Serving Tiles Without a 'Server'

Arnie Shore ashore3 at verizon.net
Sat Jun 5 09:45:57 EDT 2010


Hello all.

I'm using the script at 
http://wiki.openstreetmap.org/wiki/OpenLayers_Simple_Example:

I have a set of OSM tiles under my 'tiles'directory - named correctly, I 
believe.  (e.g., '13/2352/3131.png') - on my web server's /osm/tiles 
directory.

I'm trying to serve these up with the following lines (using the base 
example script noted above) , which gets me the empty pink:
                 layer = new OpenLayers.Layer.WMS( "OpenLayers WMS", 
"http://127.0.0.1/osm/tiles/");
                 map.addLayer(layer);

which I've adapted from the following lines in the simple example, which 
works correctly:
                 var my_map_obj = new OpenLayers.Layer.OSM();
                 map.addLayer(my_map_obj);

My question is whether something this lightweight can really work?  (I'd 
like to RTFM on this, but I haven't yet found the M to R.)  If yes, what 
do I need to do to make it work?

Thanks for any help on this.

AS



More information about the Users mailing list