Dear Robert,Another way of asking the above question is that if I can get hold of a map-service URL, say, as a user input, how do I go about displaying it in my application without having to hard-code each of the parameters like fullExtent and LODs.
//Populate your combobox with an array like this. private var ABC:ArrayCollection = new ArrayCollection([{label:"Subway", msurl:"the map service url",extent:"-78.75651009240596,39.6278291354036,-78.74282009759395,39.634491742596595"}, {label:"CiCi's Pizza", msurl:"the map service url", extent:"-78.84485849540602,39.6282293839035,-78.831168500594,39.634891991096495"}, {label:"Auntie Anne's", msurl:"the map service url", extent:"-78.84208596390596,39.623430996403556,-78.82839596909395,39.63009360359655"}, {label:"Orange Julius", msurl:"the map service url", extent:"-78.841786340406,39.6244109709035,-78.82809634559399,39.63107357809649"}]); //Then you get access to the extent using some code like this: var ext:String = yourComboboxId.dataProvider[yourComboboxId.selectedIndex].extent;
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.