On Mon, 2009-01-19 at 00:01 -0800, NileshPasalkar wrote:
>
>
> Jon Burgess-2 wrote:
> >
> > On Wed, 2009-01-14 at 00:09 -0800, NileshPasalkar wrote:
> >> I want to zoom map depends upon to Lat long value what I found is only
> >> one
> >> function take lat long value as param which is Query_Map_point. I don;t
> >> found the relevant information for this function so if any body has any
> >> idea about what this function does please let me know,
> >
> > You need to create a bounding box envelope with the map co-ordinates and
> > then call the map zoom, for a fairly simple example see:
> >
> > http://trac.openstreetmap.org/browser/applications/rendering/mapnik/generate_image.py
> >
> > Jon
> >
> >
> > _______________________________________________
> > Mapnik-users mailing list
> > [email protected]
> > https://lists.berlios.de/mailman/listinfo/mapnik-users
> >
> >
>
> Hi Jon Burgess,
>
> I have tried with the boundary box but I don;t able to use it. I have out
> put with blank image this is the code I have done for it
>
>
> from mapnik import *
> from mapnik import Projection, Coord
>
> m = Map(600,300,"+proj=latlong +datum=WGS84")
> m.background = Color('rgb (205, 227, 237)')
...
> En = Envelope(-50,-50,1000,1000)
Where do you get these numbers from? 1000 is not a valid lat/long.
For a simple world map you want:
En = Envelope(-180.0,-90.0, 180.0,90.0)
> m.zoom_to_box(En)
> render_to_file(m,'world.png', 'png')
Jon
_______________________________________________
Mapnik-users mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/mapnik-users