How about map.zoomToMaxExtent()? Eric

2008/9/5, Bill Thoen <[EMAIL PROTECTED]>:
> All I know is that I have some vectors in a layer somewhere on the map,
> but I don't know where their center is or how far out I need to zoom to
> them all at the maximum zoom scale.  I need a bounding box for an entire
> layer, if that's possible because these layers are not the same (these
> are pipeline networks for different companies).
>
> Eric Lemoine wrote:
>> Hi. Why don't you use map.setCenter to zoom to a specific zoom level? Eric
>>
>> 2008/9/3, Bill Thoen <[EMAIL PROTECTED]>:
>>
>>> I want to zoom a map to the extent of a layer (called baseLayer) but
>>> when I try:
>>> map.zoomToExtent(baseLayer.getDataExtent());
>>> the baseLayer.getDataExtent() function returns null. When I don't
>>> include this line everything works fine (the layer appears normally,
>>> only without the zoom that I want.) What am I missing here?
>>> _______________________________________________
>>> Users mailing list
>>> Users@openlayers.org
>>> http://openlayers.org/mailman/listinfo/users
>>>
>>>
>>
>>
> _______________________________________________
> Users mailing list
> Users@openlayers.org
> http://openlayers.org/mailman/listinfo/users
>
_______________________________________________
Users mailing list
Users@openlayers.org
http://openlayers.org/mailman/listinfo/users

Reply via email to