|
POST
|
Nathan, I will attempt to explain the process. If the map has a layer with popup defined then the map will attach event listeners to the the map and fire off a query to the layers service to see if the map click has a feature or features that intersect the click point. If there are intersected features then the map sends the popup dijit (InfoWindow: Default value is an instance of a Popup) set features method the results of the query. The popup looks to see if there is an PopupTemplate defined for that feature and then formats the popup content based on that template. If there is more than one layer that have popups defined or more then one feature of a layer that intersects the map click the the popup will have all the features sent to its features property and then show the pagination controls. FYI: After version 3.4 the Popup is the default, so don't look down the road of InfoWindow class. Hope this helps.
... View more
09-16-2020
11:43 AM
|
1
|
2
|
2692
|
|
POST
|
Using the proper value works fine: <html lang="en-US">
... View more
09-16-2020
09:24 AM
|
0
|
0
|
2402
|
|
POST
|
Adding <html lang="en-US"> Works fine. You need to make sure you are using the proper property value.
... View more
09-16-2020
09:23 AM
|
1
|
0
|
1953
|
|
POST
|
Jason, Couple of issues. You are trying to give the geometry service an simple object and not an actual geometry class object. You are trying to set the views center to a line when it only takes points. <!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no">
<title>Basic Map</title>
<style>
html, body, #viewDiv {
padding: 0;
margin: 0;
height: 100%;
width: 100%;
}
</style>
<link rel="stylesheet" href="https://js.arcgis.com/4.15/esri/themes/light/main.css">
<script src="https://js.arcgis.com/4.15/"></script>
<script>
//style line
var simpleLineSymbol = {
type: "simple-line",
color: [226, 119, 40], // orange
width: 2
};
require([
"esri/Map",
"esri/views/MapView",
"esri/Graphic",
"esri/layers/GraphicsLayer",
"esri/geometry/Polyline",
"esri/tasks/GeometryService",
"esri/tasks/support/ProjectParameters",
"esri/geometry/SpatialReference"
], function(Map, MapView, Graphic, GraphicsLayer, Polyline, GeometryService, ProjectParameters, SpatialReference) {
var sr = new SpatialReference({
wkid: 2953
});
var map = new Map({
basemap: "topo-vector"
});
var graphicsLayer = new GraphicsLayer();
map.add(graphicsLayer);
var parcelOutline = Polyline({
type: "polyline",
paths: [[2637816.5,7418383.95],[2637788.4,7418370.9],[2637760.75,7418357.95],[2637743.65,7418416.45],[2637799.35,7418440.55],[2637816.5,7418383.95]],
spatialReference: sr
});
var geomSer = new GeometryService({url: 'https://sampleserver6.arcgisonline.com/arcgis/rest/services/Utilities/Geometry/GeometryServer'});
var params = new ProjectParameters({
geometries: [parcelOutline],
outSpatialReference: new SpatialReference({wkid:102100})
});
geomSer.project(params).then(function(results){
var parcelOutlineGraphic = new Graphic({
geometry: results[0],
symbol: simpleLineSymbol
});
var view = new MapView({
container: "viewDiv",
map: map,
center: results[0].extent.center,
zoom: 13
});
graphicsLayer.add(parcelOutlineGraphic);
});
});
</script>
</head>
<body>
<div id="viewDiv"></div>
</body>
</html>
... View more
09-16-2020
09:18 AM
|
0
|
0
|
907
|
|
POST
|
Shannon, This line is the problem. on(kmlBtn, "click", loadKML());
//the loadKML() cause the code to call the function imediately
//when the code is parsed.
on(kmlBtn, "click", loadKML);
//this is the correct way.
... View more
09-16-2020
08:57 AM
|
0
|
1
|
2806
|
|
POST
|
Martin, Glad You found a way while I was away. The ways to do this in code is In the Widget.js _initDrawBox function. this.drawBox.drawToolBar._options.showTooltips = false;
... View more
09-16-2020
06:29 AM
|
1
|
1
|
1831
|
|
POST
|
Nope. Your requirements need to conform to methods available.
... View more
09-11-2020
04:32 AM
|
0
|
2
|
4388
|
|
POST
|
Michael, Your make this way to complicated by overthinking things. A Scene layer is just another layer type. It has a URL thus that url can be used in a FeatureLayer constructor. JS API layer objects have a type property that can be used to evaluate the type of object it is. I am not an expert on your exact scenario I am only providing a suggestion to get past your error about the layer being a scene layer. I actually don't understand why it is have an error like that but it is likely due to the fact that FeatureTable is clearing indicated that it is still in beta release.
... View more
09-11-2020
04:30 AM
|
2
|
1
|
6991
|
|
POST
|
https://developers.arcgis.com/javascript/3/jsapi/map-amd.html#isscrollwheel
... View more
09-10-2020
03:27 PM
|
0
|
0
|
2549
|
|
POST
|
typeof - JavaScript | MDN YourLayer object dot url (i.e. the layers url property) https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-FeatureLayer.html#constructors-summary
... View more
09-10-2020
12:17 PM
|
2
|
3
|
6991
|
|
POST
|
Mark, In the MapManager.js _show2DWebMap method (see line 46). ...
mapDeferred.then(lang.hitch(this, function(response) {
var map = response.map;
//hide the default zoom slider
map.hideZoomSlider();
// set default size of infoWindow.
map.infoWindow.resize(270, 316);
//var extent;
map.itemId = appConfig.map.itemId;
map.itemInfo = response.itemInfo;
map.webMapResponse = response;
// enable snapping
var options = {
snapKey: keys.copyKey
};
map.enableSnapping(options);
html.setStyle(map.root, 'zIndex', 0);
map._initialExtent = map.extent;
this.layerInfosObj = LayerInfos.getInstanceSyncForInit(map, map.itemInfo);
//save layer's original refreshInterval
this.layerInfosObj.getLayerInfoArrayOfWebmap().forEach(function(layerInfo) {
layerInfo.getLayerObject().then(lang.hitch(this, function(layerObject){
if(layerObject){
lang.setObject("_wabProperties.originalRefreshinterval", layerObject.refreshInterval, layerObject);
}
}), lang.hitch(this, function(err){
console.error("can't get layerObject", err);
}));
}, this);
if(appConfig.map.mapRefreshInterval && !appConfig.map.mapRefreshInterval.useWebMapRefreshInterval){
this._updateRefreshInterval(appConfig.map.mapRefreshInterval);
}
this._showUnreachableLayersTitleMessage();
this._publishMapEvent(map);
setTimeout(lang.hitch(this, this._checkAppState), 500);
this._addDataLoadingOnMapUpdate(map);
this._hideError();
this.filterManager.applyWidgetFilter('LOJIC_PublicSafety_Louisville_8690', null, "PD_NAME LIKE '% DIVISION'");
}), lang.hitch(this, function(error) {
console.error(error);
this._showError(error);
topic.publish('mapCreatedFailed');
}));
... View more
09-10-2020
11:52 AM
|
1
|
5
|
3539
|
|
POST
|
Alex, ArcGIS Enterprise 10.7.1 use WAB 2.12 About release versions—Portal for ArcGIS | Documentation for ArcGIS Enterprise You need to upgrade to 10.8 at least to get that widget in Portal.
... View more
09-10-2020
10:29 AM
|
0
|
0
|
984
|
|
POST
|
Michael, So it sounds like what you are sending to the FeatureTables layer property is not what it expects sometimes. You should evaluate the layers typeof and if it is a SceneLayer then get the url property and create a FeatureLayer from the url then feed that to the FeatureTable.
... View more
09-10-2020
09:57 AM
|
0
|
5
|
6991
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 04-14-2020 11:36 AM | |
| 17 | 05-17-2021 01:51 PM | |
| 1 | 07-06-2020 05:32 AM | |
| 1 | 07-10-2018 05:49 AM | |
| 9 | 01-28-2022 10:58 AM |
| Online Status |
Offline
|
| Date Last Visited |
06-08-2026
06:27 AM
|