[OpenLayers-Users] Zoom to WMC extent

jvanulde jvanulde at NRCAN.GC.CA
Fri Aug 15 19:04:52 EDT 2008


Hi Bart, 

I tried that but I get an null error on format.context.bounds.



Bart van den Eijnden wrote:
> 
> Hi Joost,
> 
> it should be as simple as:
> 
> map.zoomToExtent(format.context.bounds);
> 
> Best regards,
> Bart
> 
>>
>> I thought this would be simple and probably is, but the solution is
>> evading
>> me.  I have loaded a WMC into a map but the image is centered in the map
>> window with lots of white space.  I would like the map to zoom to the
>> context extent.  Any ideas on how this can be done?  I have tried setting
>> the map option maxExtent to context.bounds but no dice.
>>
>> Cheers and thanks!
>> --
>> View this message in context:
>> http://www.nabble.com/Zoom-to-WMC-extent-tp18974245p18974245.html
>> Sent from the OpenLayers Users mailing list archive at Nabble.com.
>>
>> _______________________________________________
>> Users mailing list
>> Users at openlayers.org
>> http://openlayers.org/mailman/listinfo/users
>>
> 
> 
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
> 
> 

-- 
View this message in context: http://www.nabble.com/Zoom-to-WMC-extent-tp18974245p19006764.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.




More information about the Users mailing list