POST
|
Thanks Larry. I'll take a look at that. It could be very useful.
... View more
02-24-2015
10:46 AM
|
0
|
0
|
1172
|
POST
|
I've been running into the same problem. I'm trying to write a custom widget that allows the user to change the app's webmap by selecting from their account's layers or searching ArcGISOnline. First I wasn't able to use map.destroy because it just wouldn't work and then new maps would be created under it. Instead I had to use dojo to find and destroy all of the map_root divs before adding a new map. It mostly works but I had to do some elaborate things to get the widgets to accept the new map. For some widgets it was fairly simple, I just needed to use their setMap method. But other widgets had more complicated details. For the basemap gallery I had to use dijit.byId(dojo.query('.jimu-widget-basemapgallery')[0].id).basemapGallery.map=map instead of just setMap(map). For the draw tool I had to use dijit.byId(dojo.query('.jimu-widget-draw')[0].id).drawBox.setMap(map). The layer list was a pain to update, too. Now everything works except the Home Button, My Location, and Geocoder. For some reason setting them to the new map does nothing and I can't find anywhere else to change them. At this point it might be easier just to destroy and re-create the widgets but I was having problems with that as well. I did manage to make a custom widget that lets the app user browse their map layers and search AGOL and then add those layers to the map and that worked perfectly fine. It's just destroying and re-creating the map that screws stuff up.
... View more
02-18-2015
05:12 PM
|
0
|
9
|
1172
|
POST
|
I think WebApp builder is your best bet. You may need to write some custom widgets like for the navigation bar though all the code you need is here: Map navigation tools | ArcGIS API for JavaScript The splash window is the easiest, just click it and change the text. Clicking only selects visible layers by default. For buffering you might add it as a task to the geoprocessing widget or make a custom widget based on code like this: Buffer any shape | ArcGIS API for JavaScript You can edit the query widget to add a task that will filter layers by attributes. There's a button at the bottom of the query widget to clear the selected features. The banner might require you to make a custom theme. You can configure the basemap gallery widget to include whatever basemaps you want and it will effortlessly switch between them in the app.
... View more
02-18-2015
02:01 PM
|
0
|
0
|
218
|
POST
|
I'm looking for a way to do this as well. I need to be able to add a separate set of layers that are not listed in the app's main layer list. Right now I'm trying to decide if I should modify the layer list widget code or create a second layer list. Either way I haven't found a way to stop the main layer list widget from adding any new layers to its list immediately.
... View more
02-18-2015
01:02 PM
|
0
|
0
|
765
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|