|
POST
|
There are a couple issues with the code, but I think the main one is that the source property of FeatureLayer expects an array, not a single object. FeatureLayer | ArcGIS API for JavaScript 4.13 I cleaned-up your code and got it working like this: https://codepen.io/noash/pen/jOEMVqg
... View more
12-13-2019
04:14 PM
|
1
|
2
|
5839
|
|
POST
|
Does something like this help? Sketch update validation | ArcGIS API for JavaScript 4.13 It limits the actions and extent of updates using the SketchViewModel.
... View more
12-06-2019
01:11 PM
|
0
|
5
|
4220
|
|
POST
|
The createBookmark() method seems to work with the BookmarksViewModel class. Here's a simple case with the method wired up to a button: sample https://codepen.io/noash/pen/eYmpWrP
... View more
12-06-2019
01:07 PM
|
0
|
0
|
981
|
|
POST
|
Currently, nautical miles are not supported with the ScaleBar widget. One option would be to use the 2D distance measurement widget and set the units or unitOptions to nautical miles so you can draw a line of specific length for comparisons. DistanceMeasurement2D | ArcGIS API for JavaScript 4.13
... View more
12-05-2019
10:55 AM
|
0
|
1
|
1457
|
|
POST
|
You can also take a look at this sample that shows how to add glTF models to a 3D SceneView: Import glTF 3D Models | ArcGIS API for JavaScript 4.13
... View more
12-05-2019
10:48 AM
|
2
|
0
|
2708
|
|
POST
|
I think this is due to some IE11 limitations. You can review some of the known limitations here: System Requirements | ArcGIS API for JavaScript 4.13 And/or check your some of your code functionality with something like caniuse for IE11 compatibility: https://caniuse.com/
... View more
12-05-2019
10:45 AM
|
0
|
0
|
1179
|
|
POST
|
Ryan Libed wrote a great blog post on this subject using the 4x version of the ArcGIS API for JavaScript: https://community.esri.com/people/RLibed-esristaff/blog/2018/12/20/screenshots-with-the-arcgis-api-for-javascript-html2canvas
... View more
12-05-2019
10:40 AM
|
1
|
0
|
2793
|
|
POST
|
Update: looks like this is an issue with the API. We will address it and get it fixed at a release in the near future.
... View more
12-05-2019
10:27 AM
|
0
|
0
|
2118
|
|
POST
|
Looks like it should work, try this as a proof-of-concept: <!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no">
<title>Layer List WMS</title>
<link rel="stylesheet" href="https://js.arcgis.com/3.30/dijit/themes/claro/claro.css">
<link rel="stylesheet" href="https://js.arcgis.com/3.30/esri/css/esri.css">
<style>
html, body, .container, #map {
height:100%;
width:100%;
margin:0;
padding:0;
margin:0;
font-family: "Open Sans";
}
#map {
padding:0;
}
#layerListPane{
width:25%;
}
.esriLayer{
background-color: #fff;
}
.esriLayerList .esriList{
border-top:none;
}
.esriLayerList .esriTitle {
background-color: #fff;
border-bottom:none;
}
.esriLayerList .esriList ul{
background-color: #fff;
}
</style>
<script>var dojoConfig = { parseOnLoad: true };</script>
<script src="https://js.arcgis.com/3.30/"></script>
<script>
require([
"esri/map",
"esri/dijit/LayerList",
"esri/layers/WMSLayer",
"esri/layers/WMSLayerInfo",
"esri/geometry/Extent",
"dijit/layout/BorderContainer",
"dijit/layout/ContentPane",
"dojo/domReady!"
], function(
Map,
LayerList,
WMSLayer,
WMSLayerInfo,
Extent
) {
var map = new Map('map', {
basemap: 'streets',
center: [-96, 37],
zoom: 4
});
var layer1 = new WMSLayerInfo({
name: '1',
title: 'Rivers'
});
var layer2 = new WMSLayerInfo({
name: '2',
title: 'Cities'
});
var resourceInfo = {
extent: new Extent(-126.40869140625, 31.025390625, -109.66552734375, 41.5283203125, {
wkid: 4326
}),
layerInfos: [layer1, layer2]
};
var wmsLayer = new WMSLayer('https://sampleserver1.arcgisonline.com/ArcGIS/services/Specialty/ESRI_StatesCitiesRivers_USA/MapServer/WMSServer', {
resourceInfo: resourceInfo,
visibleLayers: ['1', '2']
});
var counter = 0;
wmsLayer.on('visibility-change', function(layer) {
console.log ('The layer changed. layer.id: ', layer.target.id);
console.log ('counter: ', counter);
counter++;
});
map.addLayers([wmsLayer]);
var myWidget = new LayerList({
map: map,
layers: [wmsLayer]
},"layerList");
myWidget.startup();
});
</script>
</head>
<body class="claro">
<div class="container" data-dojo-type="dijit/layout/BorderContainer"
data-dojo-props="design:'headline',gutters:false">
<div id="layerListPane" data-dojo-type="dijit/layout/ContentPane" data-dojo-props="region:'right'">
<div id="layerList"></div>
</div>
<div id="map" data-dojo-type="dijit/layout/ContentPane" data-dojo-props="region:'center'"></div>
</div>
</body>
</html>
... View more
11-25-2019
03:52 PM
|
0
|
4
|
2577
|
|
POST
|
A sales or account rep would be the best person to explain pricing and conditions. Sorry, just noticed that you've already review the info in the link below... From a technical perspective, here is one last bit of doc worth reviewing: findAddressCandidates—ArcGIS REST API: World Geocoding Service | ArcGIS for Developers
... View more
11-22-2019
03:10 PM
|
0
|
0
|
3352
|
|
POST
|
Thank you for the feedback. This is a known issue, and has been fixed for the next release (version 4.14, due out in December).
... View more
11-22-2019
03:01 PM
|
1
|
0
|
3063
|
|
POST
|
Sorry, not sure how to help. It would be helpful to share your JavaScript code, JS API version, and any Console error messages.
... View more
11-21-2019
11:55 AM
|
0
|
0
|
2726
|
|
POST
|
Not sure what's going wrong. Here's a working Codepen using version 3.20 and adding graphics to a map: https://codepen.io/noash/pen/mddoNgg Seems to work the same way as at the current version (3.30) Add graphics to a map | ArcGIS API for JavaScript 3.30
... View more
11-21-2019
11:52 AM
|
0
|
0
|
1341
|
|
POST
|
Sorry, I'm not sure what the issue is with the request, but here is a working sample that uses the RouteTask and the same service. "https://route.arcgis.com/arcgis/rest/services/World/Route/NAServer/Route_World" UK RouteTask Sample: https://codepen.io/noash/pen/jOOJgeW
... View more
11-21-2019
11:47 AM
|
0
|
0
|
1639
|
|
POST
|
The service is applicable for all the countries that are listed here: Network analysis coverage—ArcGIS REST API: Directions and Routing Services | ArcGIS for Developers So it should work fine. Could you share your code that shows what is failing?
... View more
11-20-2019
11:34 AM
|
0
|
2
|
1639
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | Wednesday | |
| 1 | 04-14-2026 11:59 AM | |
| 1 | 05-13-2026 10:29 AM | |
| 1 | 04-10-2026 09:11 AM | |
| 1 | 03-24-2026 11:39 AM |
| Online Status |
Online
|
| Date Last Visited |
Thursday
|