[OpenLayers-Users] Display maps in OL from mapserver

Chen kuja eiclkun at gmail.com
Tue May 6 20:34:55 EDT 2008


It WORKS~,Thanks,Julien!
Although there still remains some little problems. But I know it will be
alright. It's a new beginning to me. Tks again.


2008/5/6 Julien-Samuel Lacroix <jlacroix at mapgears.com>:

> Hi,
>
> Try with the extents of your mapfile in the maxExtent option:
> var bounds = new OpenLayers.Bounds(114.327181, 30.454108, 114.363140,
> 30.495525)
> map = new OpenLayers.Map( 'map', {maxExtent: bounds});
>
> Then after addLayer zoom on that extent:
> map.addLayer(layer);
> map.zoomToExtent(bounds);
>
> Julien
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20080507/36e0a378/attachment.html


More information about the Users mailing list