[Tilecache] Current y value # is too far from tile corner y #
Paul Ramsey
pramsey at cleverelephant.ca
Fri Feb 29 01:35:12 EST 2008
Matt, thanks for putting this info on the list, I've already made use of it.
p
On 2/28/08, Matt M <mattm8305 at yahoo.com> wrote:
> Sweet I got it line up right. Is anyone else if having a similar problem all I did was add the following to epsg projection list file.
>
> # Google Projection
> <900913> +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs
>
> I then kept the layer projection in the mapfile to:
>
> PROJECTION
> "init=EPSG:4326"
> END
>
> then added EPSG:900913 to the layer meta data section and the tilecache.cfg file.
>
> METADATA
> WMS_TITLE "states_poly"
> WMS_ABSTRACT "states_poly."
> WMS_SRS "EPSG:54004 EPSG:900913"
> END
>
> tilecache.cfg
> --------------------
>
> type=MapServer
> mapfile=/ms4w/Apache/htdocs/example.map
> layers=states_poly
>
> bbox=-20037508.3427892,-20037508.3427892,20037508.3427892,20037508.3427892
> maxResolution=156543.0339
>
> srs=EPSG:900913
> tms_type=google
>
>
> Thanks!
>
> -Matt
>
>
> ----- Original Message ----
> From: Christopher Schmidt <crschmidt at metacarta.com>
> To: Matt M <mattm8305 at yahoo.com>; tilecache at openlayers.org
> Sent: Thursday, February 28, 2008 9:49:34 AM
> Subject: Re: [Tilecache] Current y value # is too far from tile corner y #
>
>
> On
> Thu,
> Feb
> 28,
> 2008
> at
> 06:35:57AM
> -0800,
> Matt
> M
> wrote:
> >
> Well,
> that
> seems
> to
> work,
> however
> the
> tiles
> seems
> to
> be
> misaligned
> somewhat.
> >
> Is
> there
> something
> I'm
> missing?
> >
> >
> For
> the
> getTileUrl()
> I
> have
> the
> following:
> >
> >
> function
> (tile,zoom)
> >
>
>
> {
> >
>
>
>
>
> var
> url
> =
> "http://localhost/cgi-bin/tilecache.cgi/1.0.0/vmap0/";
> >
>
>
>
>
> var
> x
> =
> tile.x;
> >
>
>
>
>
> var
> y
> =
> tile.y;
> >
>
>
>
>
> return
> url
> +
> zoom
> +
> "/"
> +
> x
> +
> "/"
> +
> y
> +
> ".png";
> >
>
>
>
>
> >
>
>
> }
> >
> >
> tilecache.cfg
> >
> ------------------
> >
> [vmap0]
> >
> type=MapServer
> >
> mapfile=/ms4w/Apache/htdocs/example.map
> >
> layers=states_poly,states_line
> >
> bbox=-20037508.3427892,-20037508.3427892,20037508.3427892,20037508.3427892
> >
> maxResolution=156543.0339
> >
> srs=EPSG:54004
> >
> tms_type=google
>
> Well,
> I'm
> guessing
> that
> you're
> using
> the
> wrong
> projection,
> since
> "EPSG:54004"
> is
> usually
> associated
> with
> the
> standard
> 'mercator'
> projection:
> the
> proj4
> string
> you
> want
> is
> more
> typically
> associated
> with
> EPSG:900913,
> and
> is
> described
> at
> http://trac.openlayers.org/wiki/SphericalMercator
> .
> (If
> you're
> using
> a
> recent
> version
> of
> TileCache,
> this
> should
> have
> been
> described
> in
> the
> tilecache.cfg
> in
> the
> 'Google
> Projection'
> comments.)
>
> Regards,
> --
> Christopher
> Schmidt
> MetaCarta
>
>
>
>
>
>
> ____________________________________________________________________________________
> Be a better friend, newshound, and
> know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
>
> _______________________________________________
>
> Tilecache mailing list
> Tilecache at openlayers.org
> http://openlayers.org/mailman/listinfo/tilecache
>
More information about the Tilecache
mailing list