[Users] ScaleSelectorCombo issue
Cédric Moullet
cedric.moullet at camptocamp.com
Mon Mar 22 14:45:05 CET 2010
Only an idea, but without warranty.
Could you please try to add the layers to the map *before* creating the
ScaleSelectorCombo (with map.addLayers()) ?
Cédric
On Mon, Mar 22, 2010 at 2:31 PM, Estelle A <estelle_ancelet at hotmail.fr>wrote:
> Hi all,
>
> I have an issue with the ScaleSelectorCombo developed by Cedric Moullet (
> http://dev.geoext.org/sandbox/cmoullet/ux/ScaleSelectorCombo/examples/ScaleSelectorComboExample.html
> ).
>
> In my interface, the Combobox allowing to switch scales stucks at “*1 :
> undefined”* (see in the attached).
>
> I don’t know where this issue comes from.
>
> I specify that when I run the ScaleSelectorComboExample.html in my own
> server it works.
>
> Also, the zoom-chooser example works (
> http://dev.geoext.org/trunk/geoext/examples/zoom-chooser.html).
>
>
>
> Thanks for any help.
>
>
>
> Estelle
>
>
>
> Here is my code:
>
>
>
> var map;
>
>
>
> Ext.onReady(function() {
>
>
>
> var options, layer;
>
>
>
> options = {
>
> maxExtent: new OpenLayers.Bounds(0, 1300000, 1500000,
> 3000000),
>
> maxResolution: 'auto',
>
> controls: [new OpenLayers.Control.KeyboardDefaults(),new
> OpenLayers.Control.MousePosition({"numDigits": 2}),new
> OpenLayers.Control.Navigation(), new OpenLayers.Control.Scale()],
>
> scales: [12500, 25000, 50000, 100000, 200000, 500000,1500000],
>
> units: 'm',
>
> projection: new OpenLayers.Projection("EPSG:27572"),
>
> };
>
>
>
>
>
> map = new OpenLayers.Map(options);
>
>
>
>
>
> var scaleSelectorCombo = new GeoExt.ux.form.ScaleSelectorCombo({
>
> map: map,
>
> fakeScaleValue: ["12500", "25000", "50000", "100000", "200000",
> "500000","1500000"]
>
> });
>
>
>
> var viewport = new Ext.Viewport({
>
> layout: 'border',
>
> items: [{
>
>
> region:'center',
>
> id:
> "mappanel",
>
> title:
> ‘Title’,
>
> xtype:
> 'gx_mappanel',
>
> map:
> map,
>
> split:
> true,
>
> layers:
> [wms18,wms7,wms5],
>
> contentEl:
> 'center',
>
> bbar:
> [scaleSelectorCombo]
>
> }]
>
> });
>
>
>
> });
>
> ------------------------------
> Envie de naviguer sur Internet sans laisser de trace? La solution avec
> Internet Explorer 8 <http://clk.atdmt.com/FRM/go/207186970/direct/01/>
>
> _______________________________________________
> Users mailing list
> Users at geoext.org
> http://www.geoext.org/cgi-bin/mailman/listinfo/users
>
>
--
Geospatial Director Camptocamp SA
Cédric Moullet
PSE A
CH-1015 Lausanne
www.camptocamp.com / www.mapfish.org / twitter.com/cedricmoullet /
mapfishblog.blogspot.com/
+41 79 759 69 83 (mobile)
+41 21 619 10 21 (direct)
+41 21 619 10 10 (centrale)
+41 21 619 10 00 (fax)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.geoext.org/pipermail/users/attachments/20100322/880e7d9a/attachment.htm
More information about the Users
mailing list