Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

imported data by using Osm2pgsql, to get rid off all problems related to data conversion, i stored this as latlong (-l parameter).I created stylesheet, and i tested with python script and it was working (so both data and stylesheet should be fine). Here comes problem..., when i tried to use it with open layers, i got my basic layer covered by pinkish "image not found" tile, but when i try to access tile by calling cgi script "http://localhost/tc/tilecache.cgi/1.0.0/osm/5/31/26.png" i have nicely generated tile

is any one have idea what i'm doing wrong? files:

osm.xml

    <Map background-color="#00000000" srs="+proj=latlong +datum=WGS84">
  <Style name="roadStyle">
    <Rule>

      <LineSymbolizer stroke="#ff0000" stroke-width="100" />

    </Rule>
  </Style>

  <Layer name="roads" srs="+proj=latlong +datum=WGS84">
    <StyleName>roadStyle</StyleName>
 <Datasource>
     <Parameter name="table">
       (select way,highway from planet_osm_line where highway in ('motorway','motorway_link','trunk','trunk_link','primary','primary_link','secondary','secondary_link','tertiary','tertiary_link','residential','unclassified') order by z_order) as roads

    </Parameter>
    <Parameter name="type">postgis</Parameter>

    <Parameter name="user">www-data</Parameter>
    <Parameter name="password">gis</Parameter>
    <Parameter name="dbname">gis</Parameter>
    <Parameter name="estimate_extent">true</Parameter>

  </Datasource>
  </Layer>

</Map>

tilecatche.cfg

[cache]
type=Disk
base=/tmp/tilecache

[osm]
type=Mapnik
mapfile=/var/www/tc/osm/osm.xml
extension=png


[basic]
type=WMS
url=http://labs.metacarta.com/wms/vmap0
extension=png

definition of my layers

var map = new OpenLayers.Map('map',
      {
        numZoomLevels: 12,
        projection: new OpenLayers.Projection("EPSG:4326"),
        displayProjection: new OpenLayers.Projection("EPSG:4326")
      });


var layer = new OpenLayers.Layer.WMS( "VMap0", 
                "tilecache.cgi?", {layers: 'basic', format: 'image/png' } );
var tms = new OpenLayers.Layer.WMS( "osm","tilecache/tilecache.cgi?",
      { layers:'osm',  format: 'image/png'},{ isBaseLayer: false}  );  
share|improve this question

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.