Thanks Chris, i tried adding the data-extent= and bbox= lines
(like the googlecode example ) to the tilecache.cfg and am still
getting the bg color tiles only.
Could this be a problem with proj4 not being configured properly
on my machine?
here is my setup with a UTM12N configuration (shp data is already
in the specified projection):
"mapfile.xml":
<?xml version="1.0" encoding="utf-8"?>
<Map srs="+proj=utm +zone=12 +ellps=WGS84 +datum=WGS84 +units=m
+no_defs" bgcolor="#4682b4">
<Style name="base Style">
/* STYLE STUFF */
</Style>
<Layer name="base" srs="+proj=utm +zone=12 +ellps=WGS84
+datum=WGS84 +units=m +no_defs" status="1" clear_label_cache="0">
<StyleName>base Style</StyleName>
<Datasource>
<Parameter name="file">/mapnik/data/basemap_UTM12N</
Parameter>
<Parameter name="type">shape</Parameter>
</Datasource>
</Layer>
</Map>
what is the difference between setting the Map srs and the Layer
srs? they should be the same, correct?
"tilecache.cfg":
[base]
type=Mapnik
mapfile=/mapnik/python/mapfile.xml
srs=EPSG:32612
projection= +proj=utm +zone=12 +ellps=WGS84 +datum=WGS84 +units=m
+no_defs
data_extent=258102.939, 299699.148, 258642.253, 300018.891
bbox=258102.939, 299699.148, 258642.253, 300018.891
openlayers js:
function init() {
var lon = -113.983;
var lat = 46.8609;
var zoom = 17;
OpenLayers.Feature.Vector.style['default'].cursor = 'pointer';
var map = new OpenLayers.Map($('map'),
{
controls: [ new OpenLayers.Control.Navigation(), new
OpenLayers.Control.PanZoomBar() ],
maxResolution: 360/512,
projection: "EPSG:32612",
numZoomLevels: 20,
minZoomLevel: 17,
maxZoomLevel: 20
}
);
-does anything except for the projection: "EPSG:32612", line need
to be set here?
Thanks!
-jamie robertson
On Fri, Oct 24, 2008 at 2:45 PM, Christopher Schmidt <[EMAIL PROTECTED]
> wrote:
On Fri, Oct 24, 2008 at 02:37:34PM -0600, Jamie Robertson wrote:
> - When i try this, the tiles (via tilecache.py) are rendered,
but the
> output is just the bg color, and none of the data is
rendered. Do i need to
> furthur specify the projection in the *tilecache.cfg* file?
such as:
you don't need to specify the projection again, but you *do* need to
specify the resolution and extents of your data. (extents are a 4-
tuple
seperated by commas, resolution is typically 'maxresolution=' with a
single value: often the equivilant of taking the maximum width of
the
data and dividing by 512.)
To use with OpenLayers, you'll further need to ensure that these
settings match between OpenLayers and TileCache.
>
> [base]
> type=Mapnik
> mapfile=/mapnik/python/mapfile.xml
> srs=EPSG:102700
> projection= +proj=lcc +lat_1=45 +lat_2=49 +lat_0=44.25
+lon_0=-109.5
> +x_0=600000.0000000001 +y_0=0 +ellps=GRS80 +datum=NAD83
> +to_meter=0.3048006096012192 +no_defs
>
> - I've also tried this procedure with shapefile data that is
already in
> the UTM12N projection *EPSG: 32612* without success.
>
> Any ideas?
>
> Thanks!
>
> -Jamie Robertson
> _______________________________________________
> Mapnik-users mailing list
> [email protected]
> https://lists.berlios.de/mailman/listinfo/mapnik-users
--
Christopher Schmidt
MetaCarta
_______________________________________________
Mapnik-users mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/mapnik-users