[Users] Adding a feature to map zooms to hightest zoom level: why?

Andreas Hocevar ahocevar at opengeo.org
Thu Jan 13 11:45:08 CET 2011


Right. If you use llbbox, you have to transform it to your map's projection.

Andreas.

On Jan 13, 2011, at 11:10 , Pierre Giraud wrote:

> I suspect that the "llbbox" value is not correct.
> Where does it come from and what does it look like ?
> 
> Pierre
> 
> On Thu, Jan 13, 2011 at 11:00 AM, Robert Buckley
> <robertdbuckley at yahoo.com> wrote:
>> Hi,
>> 
>> I have an ext window that reads my getcapabilities doc. thee BBar has a
>> button which then add the layer to the map. However, when this is added it
>> is zoomed right the way in to the largest scale.
>> 
>> Why is this not working as it should?
>> 
>> thanks for any help...
>> 
>> here is the code
>> 
>>  bbar: [{
>>         text: "Add To Map",
>>         handler: function() {
>>             capabilitiesgrid.getSelectionModel().each(function(record) {
>>                 var clone = record.clone();
>>                 clone.get("layer").mergeNewParams({
>>                     format: "image/png",
>>                     transparent: true
>>                 });
>>                 mapPanel.layers.add(clone);
>>                 map.zoomToExtent(
>>                     OpenLayers.Bounds.fromArray(clone.get("llbbox"))
>>                 );
>>             });
>>         }
>>     }]
>> 
>> 
>> yours,
>> 
>> Robert
>> 
>> 
>> _______________________________________________
>> Users mailing list
>> Users at geoext.org
>> http://www.geoext.org/cgi-bin/mailman/listinfo/users
>> 
>> 
> 
> 
> 
> -- 
> Pierre GIRAUD
> Géomaticien, Analyste
> 
> Camptocamp France SAS
> Savoie Technolac, BP 352
> 73377 Le Bourget du Lac, Cedex
> 
> Tel : 00 33 4 79 44 44 93
> Mail : pierre.giraud at camptocamp.com
> http://www.camptocamp.com
> _______________________________________________
> Users mailing list
> Users at geoext.org
> http://www.geoext.org/cgi-bin/mailman/listinfo/users



-- 
Andreas Hocevar
OpenGeo - http://opengeo.org/
Expert service straight from the developers.



More information about the Users mailing list