POST
|
Never thought about that. (So I am totally guessing what may work here.) Have you tried ... ? 1. Put "arcgisUtils.createMap(webmapId, "mapDiv").then(function(response) { map = response.map;}" inside a function that accept webmapId paramter? 2. Create a toggle button to toggle between map id's? Of course, the potential problem may be that there are more than one base layer/map in the map, but you can find out.
... View more
12-16-2014
04:28 PM
|
0
|
4
|
832
|
POST
|
Just want to let you know that it works on IE11. (It is the only IE version that I can test on this computer.)
... View more
12-16-2014
04:14 PM
|
0
|
0
|
635
|
POST
|
Just want to add to Andrew Pratt's code. You could add an event listener to the toggle and do switch there between 2 or more base layer. Example: toggler.on("toggle", changeNextBasemap); function changeNextBasemap(event){ switch(event.currentBasemap){ case 1: toggle.basemap = "whatever"; break; case 2: case 3: case 4: ... } }
... View more
12-16-2014
03:54 PM
|
0
|
0
|
602
|
POST
|
You could simply use JS to to create a HTML table on fly, append the table, and print the table or map w/ the table. The table can be on the second page.
... View more
12-16-2014
01:31 PM
|
2
|
7
|
1404
|
POST
|
When you get the result from your query (aka features), set template for each feature and then set features (an array of features) to infoWindow. Pseudo codes: for (var feature in features){ feature.setInfoTemplate(new InfoTemplate(title, content)); } map.infoWindow.setFeatures(features)
... View more
12-16-2014
12:40 PM
|
0
|
0
|
701
|
POST
|
I am investigating an error message in console. Error: XMLHttpRequest cannot load http://[url]/arcgis/rest/info?f=json. The 'Access-Control-Allow-Origin' header contains multiple values '[url], *', but only one is allowed. Origin '[url]' is therefore not allowed access. In our web.config, it seems to be what it needs to be: <?xml version="1.0" encoding="utf-8"?> <configuration> <system.webServer> <httpProtocol> <customHeaders> <add name="Access-Control-Allow-Origin" value="*" /> </customHeaders> </httpProtocol> </system.webServer> </configuration> The error does not appear to affect the app, but it keeps popping up in console. So I am wondering how I can do about this error.
... View more
12-16-2014
11:05 AM
|
0
|
0
|
2778
|
POST
|
Have you tried style.display = "none"? Maybe the event was not fired.
... View more
11-26-2014
12:34 PM
|
0
|
2
|
607
|
POST
|
Or be lazy .. if ( map.basemapLayerIds.indexOf(addLayer.layer.id) == -1) { // not baselayer // do whatever }
... View more
11-26-2014
11:40 AM
|
1
|
1
|
1004
|
POST
|
There may be a few ways to find that info: In general, the base layer will be the very first layer (index = 0) in map.layerIds. Thus, var layer = map.layerIds[0] by default will get you the basemap. If you have more than one basemap, you can find an array of basemap with basemapLayerIds property. So, var arrLayers = map.basemapLayerIds will do. Another way to find the current basemap: var tempMap = document.getElementById("map"); console.log(tempMap.dataset.basemap); (Note: I didn't check my spelling on these, so they may not be exact.)
... View more
11-26-2014
08:37 AM
|
0
|
8
|
1004
|
POST
|
Like Ken Buja suggests, use dGrid instead. With dGrid, you can hide a column when it is created or in css. Since I don't know how to use DataGrid (anymore). I think you may be able to use "hidden" as one of the parameters inside th tag with DataGrid. Example: <th ... hidden="true">Column Name</th> <th ... hidden="false">Column Name</th>
... View more
11-24-2014
11:50 AM
|
1
|
1
|
1002
|
POST
|
I know nothing about the widget, but I can think of a possible solution/walkaround. 1. Create an Array of all layers (IDs) used by the widgets. 2. When needed, loop through the array, and find what is visible (layer.visible || layer.visibleAtMapScale);
... View more
11-24-2014
11:23 AM
|
0
|
0
|
558
|
POST
|
Thanks, Ken. Assigning spatialReference after getting the result(s) does provide the walkaround. Thanks. Btw, I have not found the exact source of problem, but many think it is because of ArcGIS Server 10.22.
... View more
08-07-2014
03:53 PM
|
0
|
0
|
764
|
POST
|
Thanks, Tracy. I did do a search before posting, but failed to find anything. Thanks for letting me know that. Do you know the source of the problem? From the API or ArcGIS Server?
... View more
08-07-2014
01:00 PM
|
0
|
3
|
764
|
POST
|
Hello, Recently, we upgraded our ArcGIS Server from 10.0 to 10.22, and some functions in our apps began to have some issues. Upon further investigation, I realized the return graphic(s) from executing IdentifyTask had wkid 4326 spatialReference even if it was specifically set to be wkid 100210. In addition, if the data source was on old ArcGIS Server 10, it would function normally (that is, the spatialReference of return graphics/features remained the same as the map.spatialReference). However, if the data source was pointing to our new ArcGIS Server 10.22, the spatialReference of the results would become wkid 4326 despite setting it to wkid 100210. Note: Query and QueryTask do NOT have the same problem, and the spatialReference stay the same. I don't know if the problem was caused by the API or ArcGIS Server 10.22. Don't know if other people also observe the same issue. Spec. Sever: Win Server 2012 RS and ArcGIS Server 10.22 App: Javascript API 3.10
... View more
08-07-2014
12:03 PM
|
0
|
8
|
1741
|
POST
|
Instead of creating another map, can you just first create and then toggle the map on and off?
... View more
07-18-2014
03:06 PM
|
0
|
0
|
1638
|
Title | Kudos | Posted |
---|---|---|
1 | 11-24-2014 11:50 AM | |
1 | 11-26-2014 11:40 AM | |
1 | 03-29-2019 04:18 PM | |
2 | 12-16-2014 01:31 PM | |
1 | 07-16-2014 12:59 PM |
Online Status |
Offline
|
Date Last Visited |
01-27-2023
10:36 PM
|