POST
|
I can't say how much has changed in five years - but I suggest you to debug it by looking into the properties of 'this' in this.appConfig.portalUrl - since the error message implies that appConfig is null - maybe this has changed since 2015? Or maybe the 'this' in your script point to something else? Anyway, good luck.
... View more
05-28-2020
12:53 AM
|
0
|
0
|
1538
|
POST
|
It is indeed to help the end users This is a question for Esri - as a solution I will make a redirect page that checks browser before it continues to the experience.
... View more
01-09-2020
12:07 AM
|
1
|
0
|
838
|
POST
|
Well, if you read my question, I am asking for an error message - not IE support ... There is no IE12 - Edge is the replacement. Happy new year
... View more
01-08-2020
07:57 AM
|
3
|
3
|
838
|
POST
|
As it is, when an application built using ArcGIS Experience Builder Beta is opened in Internet Explorer, the user sees a blank screen and an error is thrown, which is only seen if you open the console. It would be great if the user directly got a message 'Browser not supported' or similar. Thank you!
... View more
01-08-2020
07:28 AM
|
0
|
6
|
999
|
POST
|
Yes and no - the map service I consume uses symbology apparently not supported when added as individual layers. The drawing info in N/A for several of the layers after publishing to ArcGIS Server - even though they display as expected in the web map when added as a service, the symbology is lost when adding as single layers. So of course a work around is to go through the map service and change symbology - but this is not a simple exercise - these symbols (pies and flags) has been consistent for many years, and a change has to be agreed with many parties. Although adding the option would be complex in the builder code - would you consider it again? You are not as such discouraging more than one layer in a service? So why not enable the story map editors to switch them on and off? Thank you for your time Herdis
... View more
01-16-2017
03:53 AM
|
0
|
1
|
323
|
POST
|
I get the principle of not displaying a TOC to the users - I like the simplistic approach. But I do not understand why I as a creator/configurator of a story map can't turn on and off (sub) layers when setting the map content in a section? I have a web map consuming a service with 8 layers. As it is - to display the layers individually in a story map, I have to add the map service several times to my web map with different layers in the map service turned on and off. I only get the option to turn on/off a whole map service at a time. Not the layers or sub layers in the map service. Please understand - I do not want the users to be able to toggle layers on/off - I just want to be able to define it when setting up my story map. Any good reason for this?
... View more
01-13-2017
06:57 AM
|
0
|
3
|
1380
|
POST
|
One thing I can say is that fields are case-sensitive, so try replacing 'objectid' with 'OBJECTID' in your code, or even better use petroFieldsFL.objectIdField to reference the field. E.g.: updateFeature.attributes[petroFieldsFL.objectIdField] But it will not do the trick, since it is only called directly in your code in a console.log statement. A test: Do you get an error if you specify OBJECTID as outfield? FeatureLayer("http://localhost:6080/arcgis/rest/services/editing/FeatureServer/1", { mode: FeatureLayer.MODE_SELECTION, outFields: ["OBJECTID","CJ_FDR_ID", "CJ_DONE_BY", "CJ_CIR_CODE", "CJ_UID", "CJ_CIR_CODE", "CJ_TOWN_ID", "CJ_LINE_CODE", "CJ_PUID"]
... View more
09-29-2015
01:20 AM
|
0
|
1
|
271
|
POST
|
Hi Ben, You can define portalUtils in widget and access user through the portal instance: define([
'jimu/BaseWidget',
'jimu/portalUtils',
'dojo/_base/declare'
],
function(BaseWidget, portalUtils, declare) {
...
this.portal = portalUtils.getPortal(this.appConfig.portalUrl);
username = this.portal.user.username;
... See also: https://developers.arcgis.com/javascript/jsapi/portal.html https://developers.arcgis.com/javascript/jsapi/portaluser-amd.html
... View more
09-29-2015
12:42 AM
|
0
|
2
|
1538
|
POST
|
Hi, I would like to see the fields in your featurelayer, so go to this address in your browser: http://localhost:6080/arcgis/rest/services/editing/FeatureServer/1?f=json And copy/paste the json in here.
... View more
09-29-2015
12:35 AM
|
0
|
3
|
271
|
POST
|
OK. How about the layer that fails now, with missing objectid. Do you have a field called 'objectid' in that one?
... View more
09-28-2015
11:57 PM
|
0
|
6
|
814
|
POST
|
Hi Bharath, I would make sure that the layer objectIdField of the featureLayer is in fact 'objectid'. I can't see your url, it is on localhost. What happens if you use the layer that you posted earlier ("http://gisserver.cgg.gov.in/arcgis/rest/services/IRR/srsp_canal_WRK1/FeatureServer/1)? Here the objectIdField is 'objectid'. so that works on my side (I can edit it and save changes). Kind regards Herdis
... View more
09-28-2015
04:29 AM
|
0
|
8
|
814
|
POST
|
Hi Behrouz, You can read the initial map extent on load, and use that as home extent (line 15): var map;
var extent;
require(["esri/map", "esri/geometry/Point",
"esri/symbols/SimpleMarkerSymbol", "esri/symbols/SimpleLineSymbol",
"esri/graphic", "dojo/dom","dojo/on", "dojo/domReady!"], function (Map, Point,
SimpleMarkerSymbol, SimpleLineSymbol,
Graphic, dom, on) {
map = new Map("map", {
center: [0, 0],
zoom: 5,
basemap: "topo",
slider: false, // set to false to remove default zoom buttons
spatialReference: { wkid: 4326 }
})
map.on("load", function(){extent = map.extent});
on(dom.byId("zoomInBtn"), "click", function(evt){map.setZoom(map.getZoom()+1);});
on(dom.byId("zoomOutBtn"), "click", function(evt){map.setZoom(map.getZoom()-1);});
on(dom.byId("goHome"), "click", function(evt){map.setExtent(extent)});
});
... View more
09-02-2015
12:46 AM
|
1
|
1
|
679
|
POST
|
Hi Huzma, If you open your app in chrome and right click thumb - choose Inspect Element - from here you can see the .css classes and files. In your case look at .claro .dijitSliderImageHandle and dijitSliderImageHandleH - override these in your own .css claro: http://js.arcgis.com/3.14/dijit/themes/claro/claro.css .claro .dijitSliderImageHandleH As an example: in Launchpadtheme for web app builder this style is overrided: overrided claro: themes/LaunchpadTheme/styles/default/css/dojo-override.css .claro .dijitSliderImageHandle
... View more
09-01-2015
01:49 AM
|
1
|
1
|
536
|
POST
|
I've just added the circle buffer to your code - then when you click a point, the inspector opens: <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <!--The viewport meta tag is used to improve the presentation and behavior of the samples on iOS devices--> <meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no"> <title>Editable FeatureLayer in Selection Only Mode with Attribute Inspector</title> <link rel="stylesheet" href="http://js.arcgis.com/3.14/dijit/themes/claro/claro.css"> <link rel="stylesheet" href="http://js.arcgis.com/3.14/esri/css/esri.css"> <style> html, body { height: 100%; width: 100%; margin: 0; padding: 0; overflow: hidden; } #mapDiv{ margin: 0; padding:0; } #detailPane{ height:20px; color:#570026; font-size:12pt; font-weight:600; overflow:hidden; } .dj_ie .infowindow .window .top .right .user .content { position: relative; } .dj_ie .simpleInfoWindow .content {position: relative;} .esriAttributeInspector {height:100px;} .esriAttributeInspector .atiLayerName {display:none;} .esriAttributeInspector .atiButton{ margin-top:1px; margin-right:45px; } </style> <script src="http://js.arcgis.com/3.14/"></script> <script> var map; var updateFeature; require([ "esri/map", "esri/layers/FeatureLayer", "esri/dijit/AttributeInspector", "esri/symbols/SimpleLineSymbol", "esri/symbols/SimpleFillSymbol", "esri/Color", "esri/layers/ArcGISDynamicMapServiceLayer", "esri/config", "esri/tasks/query", "dojo/query", "dojo/parser", "dojo/dom-construct", "dijit/form/Button", "esri/graphic", "esri/geometry/Circle", "dijit/layout/BorderContainer", "dijit/layout/ContentPane", "dojo/domReady!" ], function( Map, FeatureLayer, AttributeInspector, SimpleLineSymbol, SimpleFillSymbol, Color, ArcGISDynamicMapServiceLayer, esriConfig, Query,dojoQuery, parser, domConstruct, Button, Graphic, Circle ) { parser.parse(); // refer to "Using the Proxy Page" for more information: https://developers.arcgis.com/javascript/jshelp/ags_proxy.html // esriConfig.defaults.io.proxyUrl = "/proxy/"; map = new Map("mapDiv", { basemap: "streets", center: [78.20, 19.00], zoom: 11 }); map.on("layers-add-result", initSelectToolbar); var petroFieldsMSL = new ArcGISDynamicMapServiceLayer("http://gisserver.cgg.gov.in/arcgis/rest/services/IRR/srsp_canal_WRK1/MapServer"); petroFieldsMSL.setDisableClientCaching(true); map.addLayer(petroFieldsMSL); var petroFieldsFL = new FeatureLayer("http://gisserver.cgg.gov.in/arcgis/rest/services/IRR/srsp_canal_WRK1/FeatureServer/1", { mode: FeatureLayer.MODE_SELECTION, outFields: ["objectid","code", "codename", "length", "description", "status_work", "la_status", "ip_status"] }); var selectionSymbol = new SimpleFillSymbol( SimpleFillSymbol.STYLE_NULL, new SimpleLineSymbol( "solid", new Color("yellow"), 2 ), null ); petroFieldsFL.setSelectionSymbol(selectionSymbol); var circleSymb = new SimpleFillSymbol( SimpleFillSymbol.STYLE_NULL, new SimpleLineSymbol( SimpleLineSymbol.STYLE_SHORTDASHDOTDOT, new Color([105, 105, 105]), 2 ), new Color([255, 255, 0, 0.25]) ); var circle; petroFieldsFL.on("edits-complete", function() { petroFieldsMSL.refresh(); }); map.addLayers([petroFieldsFL]); function initSelectToolbar(evt) { //var petroFieldsFL = evt.layers[1].layer; var selectQuery = new Query(); map.on("click", function(evt) { circle = new Circle({ center: evt.mapPoint, geodesic: true, radius: 0.2, radiusUnit: "esriMiles" }); map.graphics.clear(); map.infoWindow.hide(); var graphic = new Graphic(circle, circleSymb); map.graphics.add(graphic); selectQuery.geometry =circle.getExtent();; //selectQuery.geometry = evt.mapPoint; petroFieldsFL.selectFeatures(selectQuery, FeatureLayer.SELECTION_NEW, function(features) { if (features.length > 0) { //store the current feature updateFeature = features[0]; map.infoWindow.setTitle(features[0].getLayer().name); map.infoWindow.show(evt.screenPoint, map.getInfoWindowAnchor(evt.screenPoint)); } else { map.infoWindow.hide(); } }); }); map.infoWindow.on("hide", function() { petroFieldsFL.clearSelection(); }); var layerInfos = [ { 'featureLayer': petroFieldsFL, 'showAttachments': false, 'isEditable': true, 'fieldInfos': [ {'fieldName': 'objectid', 'isEditable': false, 'objectid': 'objectid:'}, {'fieldName': 'code', 'isEditable': false, 'CANAL CODE': 'Acreage:'}, {'fieldName': 'codename', 'isEditable': false, 'label': 'CANAL NAME:'}, {'fieldName': 'length', 'isEditable': false, 'label': 'LENGTH IN METERS:'}, {'fieldName': 'description', 'isEditable': false, 'label': 'CANAL DESCRIPTION:'}, {'fieldName': 'status_work', 'isEditable': true, 'tooltip': 'WORK PROGRESS', 'label': 'WORK PROGRESS STATUS:'}, {'fieldName': 'la_status', 'isEditable': true, 'tooltip': 'LAND AQUISITION', 'label': 'LAND AQUISITION STATUS:'}, {'fieldName': 'ip_status', 'isEditable': true, 'tooltip': 'IP CREATED', 'label': 'IP CREATED STATUS:'} ] } ]; var attInspector = new AttributeInspector({ layerInfos: layerInfos }, domConstruct.create("div")); //add a save button next to the delete button var saveButton = new Button({ label: "Save", "class": "saveButton"},domConstruct.create("div")); domConstruct.place(saveButton.domNode, attInspector.deleteBtn.domNode, "after"); saveButton.on("click", function() { updateFeature.getLayer().applyEdits(null, [updateFeature], null); }); attInspector.on("attribute-change", function(evt) { //store the updates to apply when the save button is clicked updateFeature.attributes[evt.fieldName] = evt.fieldValue; }); attInspector.on("next", function(evt) { updateFeature = evt.feature; console.log("Next " + updateFeature.attributes.objectid); }); attInspector.on("delete", function(evt) { evt.feature.getLayer().applyEdits(null, null, [evt.feature]); map.infoWindow.hide(); }); map.infoWindow.setContent(attInspector.domNode); map.infoWindow.resize(350, 240); } }); </script> </head> <body class="claro"> <div data-dojo-type="dijit/layout/BorderContainer" data-dojo-props="design:'headline', gutters:false" style="width:100%;height:100%;"> <div id="detailPane" data-dojo-type="dijit/layout/ContentPane" data-dojo-props="region:'top'"> Click a field to display the attribute inspector with customized fields. </div> <div data-dojo-type="dijit/layout/ContentPane" data-dojo-props="region:'center'" id="mapDiv"></div> </div> </body> </html>
... View more
09-01-2015
12:19 AM
|
0
|
1
|
814
|
POST
|
Hi Narmala, Try fiddling with the geometry in the query - the mapPoint is very distinct, so to return features from a mapPoint you would have to be very precis [read lucky] to hit a feature. If you create a buffer around your point, you will get much better results: Select with Feature Layer | ArcGIS API for JavaScript require ([ "esri/graphic", "esri/geometry/Circle", ... var circleSymb = new SimpleFillSymbol( SimpleFillSymbol.STYLE_NULL, new SimpleLineSymbol( SimpleLineSymbol.STYLE_SHORTDASHDOTDOT, new Color([105, 105, 105]), 2 ), new Color([255, 255, 0, 0.25]) ); var circle; .... function initSelectToolbar(evt) { var petroFieldsFL = evt.layers[1].layer; var selectQuery = new Query(); map.on("click", function(evt) { circle = new Circle({ center: evt.mapPoint, geodesic: true, radius: 0.2, radiusUnit: "esriMiles" }); map.graphics.clear(); map.infoWindow.hide(); var graphic = new Graphic(circle, circleSymb); map.graphics.add(graphic); selectQuery.geometry = circle.getExtent(); ....
... View more
08-31-2015
05:40 AM
|
1
|
3
|
814
|
Title | Kudos | Posted |
---|---|---|
1 | 08-27-2015 06:21 AM | |
1 | 08-26-2015 02:06 AM | |
1 | 08-26-2015 04:03 AM | |
1 | 01-09-2020 12:07 AM | |
1 | 08-24-2015 01:56 AM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|