Select to view content in your preferred language

How to display our own imagery are certain zoom level

1768
5
05-18-2010 08:42 AM
RavinderGairola
Emerging Contributor
My requirement is to display our own imagery when user is viewing Phoenix on Aerial map where map scale is less than equal to xxxx.
If user zoom out or switch to street/topo map or move to other location like Texas State then we would like to display ESRI's imagery.

Any help or pointer will really be appreciated

Thanks
Ravi
Tags (2)
0 Kudos
5 Replies
Drew
by
Frequent Contributor
You will want to set the min and max scale on the layer to do this.

See minScale and maxScale in the docs.
http://resources.esri.com/help/9.3/arcgisserver/apis/flex/apiref/com/esri/ags/layers/Layer.html
0 Kudos
DasaPaddock
Esri Regular Contributor
This sample makes use of the minScale and maxScale properties:
http://help.arcgis.com/en/webapi/flex/samples/index.html?sample=AddLODS
0 Kudos
RavinderGairola
Emerging Contributor
This sample makes use of the minScale and maxScale properties:
http://help.arcgis.com/en/webapi/flex/samples/index.html?sample=AddLODS


min and max scale will be helpfull when user is browsing our areas but if user is browsing some other location then there will not be any image when user go past max scale of ESRI imagery.

In the sample if I brower Louisville, KY then it works but if i switch to Phoenix, AZ then there is no imagery when I go past 1:4,500.

I want to implement zoom scale but on specific region otherwise it should display defaulf imagery.
Any ideas?

Is there an event I can trap on zoom in/out on map and also when user is draging the map?
0 Kudos
DasaPaddock
Esri Regular Contributor
Yes, the Map does dispatch pan and zoom events:
http://resources.esri.com/help/9.3/arcgisserver/apis/flex/apiref/com/esri/ags/Map.html#eventSummary

I think you may be able to just listen for the extentChange event though and on each extent change, see if the map's extent intersects your layer's extent and if the map's scale is at the scale where you want to show your layer. Depending on these checks, you could change the visibility of your layer vs. the ESRI one.
0 Kudos
RavinderGairola
Emerging Contributor
Thanks for the help
0 Kudos