[OpenLayers-Users] Tile Map Service Specification
Robert J Becraft
castlewrks at hughes.net
Thu Feb 22 20:30:28 EST 2007
>From my General Questions Thread....
> How are your tiles generated now? If you can generate them
> according to TMS
> <http://wiki.osgeo.org/index.php/Tile_Map_Service_Specification>
http://wiki.osgeo.org/index.php/Tile_Map_Service_Specification
> you can use the TMS layer with OL 2.3.
>
Using this, I created the XML document vmap0 as follows...
<?xml version="1.0" encoding="UTF-8" ?>
<TileMap version="1.0.0" tilemapservice="http://localhost/Avalon/Map">
<Title>VMAP0 Avalon World Map</Title>
<Abstract>A map of the Metaphaze Avalon World</Abstract>
| <KeywordList></KeywordList>
| <Metadata type="TC211" mime-type="text/xml" href="http://www.org" />
| <Attribution>
| <Title>A Castlewrks Production</Title>
| <Logo width="10" height="10"
href="http://localhost/Avalon/images/castlewrks.gif"
mime-type="image/gif" />
| </Attribution>
| <WebMapContext href="http://wms.org" />
| <Face>0</Face>
<SRS>EPSG:4326</SRS>
<BoundingBox minx="-180" miny="-90" maxx="180" maxy="90" />
<Origin x="-180" y="-180" />
<TileFormat width="256" height="256" mime-type="image/jpeg"
extension="jpg" />
<TileSets profile=global-geodetic">
<TileSet href="http://localhost/Avalon/Map/vmap0/0"
units-per-pixel="0.703125" order="0" />
<TileSet href="http://localhost/Avalon/Map/vmap0/1"
units-per-pixel="0.3515625" order="1" />
<TileSet href="http://localhost/Avalon/Map/vmap0/2"
units-per-pixel="0.17578125" order="2" />
<TileSet href="http://localhost/Avalon/Map/vmap0/3"
units-per-pixel="0.08789063" order="3" />
</TileSets>
</TileMap>
My layer definition in the map html is:
var tlayer = new OpenLayers.Layer.TMS( "OpenLayers TMS",
"http://localhost/Avalon/Map/vmap0", {layers:
'basic'});
The directory structure where the graphics are:
/Avalon/Map/vmap01.0.0/levelzero/0/0/0.jpg
/Avalon/Map/vmap01.0.0/levelzero/0/0/1.jpg
What is interesting is when I open this layer in my document, I get one
tile of a no-graphic. The no graphic has properties for the following...
http://localhost/Avalon/Map/vmap01.0.0/undefined/0/0/0.undefined
Zooming one level gives two tiles with property of...
http://localhost/Avalon/Map/vmap01.0.0/undefined/1/0/0.undefined
http://localhost/Avalon/Map/vmap01.0.0/undefined/1/1/0.undefined
Questions:
How do I eliminate the "undefined" from the tile paths? I.e. How do I
get this to work? All the tile setups that I can find on the web are
not using this directory structure.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20070222/9d86c8fc/attachment.html
More information about the Users
mailing list