|
POST
|
I'm trying to adapt this sample so that when I have multiple services in the map, all of the layers from each service show in the layer list. I have attempted a few edits without any luck. The best I can get is one service or the other, but not both. Is there a way to edit function buildLayerList(layer) {
var items = dojo.map(layer.layerInfos,function(info,index){ so that it referencees multiple services? And is this even what I need to worry about? There are other places in the code that would need to be amended, but these are the two that stick out to me.
... View more
12-07-2012
03:58 AM
|
0
|
1
|
860
|
|
POST
|
Thanks Jeff. Totally overlooked that. This answer actually solves my basemap gallery issue as well. I appreciate the help.
... View more
12-03-2012
10:40 AM
|
0
|
0
|
1291
|
|
POST
|
How many times is onLayersAddResult firing? Can you post a full repro case? We'll be able to get to the bottom of this faster if you post code that reproduces the error. This link should work in IE9. As always, I appreciate your help.
... View more
12-03-2012
09:10 AM
|
0
|
0
|
1291
|
|
POST
|
This happens when you try to create multiple widgets with the same id. Are you trying to create a new legend without first destroying a previous one you created? No. My only instances for legend is once in the JS: //Add the Legend
legendLayers.push({
layer: layer,
title: ''
});
dojo.connect(map, 'onLayersAddResult', function (results) {
var legend = new esri.dijit.Legend({
map: map,
layerInfos: legendLayers
}, "legendDiv");
legend.startup();
});
map.addLayers([layer]);
if (layer.loaded) {
buildLayerList(layer);
} else {
dojo.connect(layer, "onLoad", buildLayerList);
} and once in the HTML: <div dojoType="dijit.TitlePane" title="Legend" closable="false" open="false" style="float:right;">
<div dojoType="dijit.layout.ContentPane" style="width:180px; overflow:auto;">
<span id="legendDiv"></span>
</div>
</div>
... View more
12-03-2012
06:43 AM
|
0
|
0
|
1291
|
|
POST
|
I'm getting: Error: Tried to register widget with id==legendDiv but that id is already registered when loading my map. I've searched around and it seems to be an issue with a few other widgets as well. Can anybody recommend a good work around?
... View more
12-03-2012
05:35 AM
|
0
|
8
|
4665
|
|
POST
|
I see multiple "dojo is not defined" errors when trying to load your app in Chrome:
Uncaught ReferenceError: dojo is not defined findGrid.js:1
Uncaught ReferenceError: dojo is not defined identify.js:1
Uncaught ReferenceError: dojo is not defined index.html:27
The page also fails in IE. Can you re-visit your live link and make sure we can repro the error there? Right now I have only had success on IE 9. The live link should work using that browser. My hope was to get it fully functional on one browser (IE9) and then work on compatability.
... View more
11-27-2012
06:27 AM
|
0
|
0
|
228
|
|
POST
|
In your app it looks like you setup the listener for the maps onLoad event but you don't have a mapReady function in your app. dojo.connect(map, "onLoad", mapReady); The basemap gallery should be created once the map has loaded so try adding the logic in the mapReady function and it should work. function mapReady(){ createBasemapGallery(); } Just realized I have a mapReady function in my external identify.js file.
... View more
11-27-2012
03:50 AM
|
0
|
0
|
1405
|
|
POST
|
still scratching my head on this. I now have a live link to my app so maybe that'll help demonstrate my issue better. The basemap gallery is not working properly and I get the error: TypeError: Unable to get value of the property '_basemapGalleryLayerType': object is null or undefined when trying to switch basemaps. Thanks. *Right now its only been tested in IE.*
... View more
11-26-2012
10:53 AM
|
0
|
0
|
1405
|
|
POST
|
there are several samples that give different customization options for the zoom slider. They are under the "map configuration" drop tree on the left side. Using the links you provided you can also Shift+Drag Mouse to create a zoom box.
... View more
11-26-2012
08:19 AM
|
0
|
0
|
770
|
|
POST
|
I have tried your suggestion and it didn't do it. Alternatively I just deleted the mapReady reference from the listener. That made the basemaps gallery load and switch correctly. However, doing that now causes my initial basemap to not load and the map to not resize.
... View more
11-21-2012
08:53 AM
|
0
|
0
|
1405
|
|
POST
|
When I run your app with Firebug enabled I see 'Aborted' errors due to this layer. Do you have an updated version of the app? http://www.gisprod2.com/ArcGIS/rest/services/Dynamic/Zoning/MapServer?f=json&dpi=96&transparent=true&format=png8&callback=dojo.io.script.jsonp_dojoIoScript2._jsonpCallback I have attached the most recent version of the app. The only difference between the two is that I inserted a hide/show of the datagrid. Thanks for your help.
... View more
11-21-2012
08:09 AM
|
0
|
0
|
1405
|
|
POST
|
Hi Kelly, You can view the error using the attachment that I posted on this thread. As far as I can tell the code is the exact same as the samples.
... View more
11-21-2012
05:16 AM
|
0
|
0
|
1405
|
|
POST
|
Started seeing the following error in my basemaps gallery today: TypeError: Unable to get value of the property '_basemapGalleryLayerType': object is null or undefined Using standard code from the samples. Any thoughts on where I can look. It had been working up until now.
... View more
11-20-2012
11:12 AM
|
0
|
10
|
2256
|
|
POST
|
Thanks for the reply. Being the noob that I am, what I really need is a way to toggle the fields of a feature layer. For instance, I have a feature layer for the parks in my county. I want the user to be able to find parks with certain attributes, like pinic areas, pavillions, baseball fields, etc. So whne they click the checkbox for "pavillions" those parks that have paviilions will be shown on the map. Same for any other attribute. I was looking at this sample as a possible way: http://help.arcgis.com/en/webapi/javascript/arcgis/help/jssamples_start.htm. Thanks again. Have you thought about using the ArcGIS for Local Goverment templates? They have a Parks Finder Application that is very similar to what you have described. Fairly easy to set up.
... View more
11-16-2012
09:23 AM
|
0
|
0
|
1020
|
|
POST
|
try this: <div dojoType="dijit.TitlePane" title="Measurement" closable="false" open="false" ">
<div id="measurementDiv"></div>
... View more
11-15-2012
08:43 AM
|
0
|
0
|
582
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 01-16-2014 09:52 AM | |
| 6 | 06-12-2013 08:01 AM |
| Online Status |
Offline
|
| Date Last Visited |
11-11-2020
02:23 AM
|