POST
|
Following is editor window initialization: the editor window does not come up. Rather the regular infowindow for the map comes up. The code runs within the context of ArcGIS Online map template. So the map variable is being passed in. The code is virtually unchanged from a sample, where the only difference is the map variable is instantiated inside the function (commented out). Is there some setting inside the map object that needs to be set to enable editor window vs infowindow from appearing? require([ "esri/config", "esri/map", "esri/SnappingManager", "esri/dijit/editing/Editor", "esri/layers/FeatureLayer", "esri/tasks/GeometryService", "esri/toolbars/draw", "dojo/keys", "dojo/parser", "dojo/_base/array", "dojo/i18n!esri/nls/jsapi", "dijit/layout/BorderContainer", "dijit/layout/ContentPane", "dojo/domReady!" ], function ( esriConfig, Map, SnappingManager, Editor, FeatureLayer, GeometryService, Draw, keys, parser, arrayUtils, i18n ) { parser.parse(); //This sample requires a proxy page to handle communications with the ArcGIS Server services. You will need to //replace the url below with the location of a proxy on your machine. See the 'Using the proxy page' help topic //for details on setting up a proxy page. esriConfig.defaults.io.proxyUrl = "/proxy/"; //This service is for development and testing purposes only. We recommend that you create your own geometry service for use within your applications esriConfig.defaults.geometryService = new GeometryService("http://tasks.arcgisonline.com/ArcGIS/rest/services/Geometry/GeometryServer"); /* map = new Map("map", { basemap: "topo", center: [-77.036, 38.891], zoom: 16 }); */ map.on("layers-add-result", initEditing); var operationsPointLayer = new FeatureLayer("https://.../FeatureServer/0", { mode: FeatureLayer.MODE_ONDEMAND, outFields: ["*"] }); map.addLayers([ operationsPointLayer ]); map.infoWindow.resize(400, 300); function initEditing(event) { var featureLayerInfos = arrayUtils.map([{ "layer": operationsPointLayer }], function (layer) { return { "featureLayer": layer.layer }; }); var settings = { map: map, layerInfos: featureLayerInfos }; var params = { settings: settings }; var editorWidget = new Editor(params, 'editorDiv'); editorWidget.startup(); //snapping defaults to Cmd key in Mac & Ctrl in PC. //specify "snapKey" option only if you want a different key combination for snapping map.enableSnapping(); deferred.resolve(true); } });
... View more
02-09-2015
01:22 PM
|
0
|
1
|
2731
|
POST
|
The editor window just doesn't show up whenever clicking on a feature. Only the regular infowindow shows up. What needs to be done to trigger the editor window to show up...
... View more
02-09-2015
11:35 AM
|
0
|
7
|
621
|
POST
|
Following is snippet of code that initializes editor window for set of editable feature layers. However when those layer features are clicked, the regular infowindow (not edit window) comes up. The regular infowindow should operate for other layers that are on the map, but the editor window for the layers that are specified in the code below. Is the infowindow conflicting with the editor window, or can they coexist somehow? The editor window is not coming up when clicking on the features for the layers below... the regular infowindow comes up. require([ "esri/dijit/editing/Editor", "esri/dijit/editing/TemplatePicker" ], lang.hitch(this, function ( Editor, TemplatePicker) { var featureLayers = []; this._incidentsLayers.forEach(function (l) { featureLayers.push(l); }); var templatePicker = new TemplatePicker({ featureLayers: featureLayers, grouping: false, rows: 1, columns: "auto" }, "editorDiv"); templatePicker.startup(); var layerInfos = []; this._incidentsLayers.forEach(function (l) { featureLayers.push({ "featureLayer": l }); }); var settings = { map: this.map, templatePicker: templatePicker, layerInfos: layerInfos }; var params = { settings: settings }; var editorWidget = new Editor(params); editorWidget.startup(); deferred.resolve(true); }));
... View more
02-08-2015
08:24 PM
|
0
|
9
|
6986
|
POST
|
Need to switch between multiple infowindow templates depending on which layer is clicked on. SetContent seems to clear the the domNode of the content for the infoWindow so that once it's used it gets cleared. The second time it gets nulled and the infowindow is empty content.
... View more
02-06-2015
04:55 PM
|
0
|
1
|
3834
|
POST
|
Is there an API available for determining if a point lies inside a polygon geometry determined by a ring? To do so for a rectangle is simple, but for a ring of points which determines a polygon, what is the best way? Thanks.
... View more
02-04-2015
09:06 AM
|
0
|
3
|
10493
|
POST
|
Is it possible to manually set the rotation? The sample seems to use renderer's setRotationInfo to define the field that has the rotation value. If I have this value and want to manually set the rotation of a given symbol, is this possible? The rotationinfo defines the field and the type = "geographic". The field can be used to get the hard value. Now just need to rotate the symbol.
... View more
02-03-2015
01:11 PM
|
0
|
1
|
296
|
POST
|
Need to get the list of graphics that lie under a region/geometry defined by mouse action (such as click-drag draw, or a simple left mouse click) and then use this list of graphics to select it and retrieve its list of attributes. The graphics are already defined on the graphicslayer, and do not want to query the backend again. What is the best way to do this?
... View more
01-29-2015
09:42 AM
|
0
|
2
|
3071
|
POST
|
What way to use the Uniquevaluerenderer's rotationinfo value to set a symbols angle? Is it as simple as getting the attribute value for the rotationinfo's field value and then using that value to set the symbol's angle of setAngle? the type is geographic. The rotation doesn't seem to be coming in right. Are there some transformations to be aware of?
... View more
01-28-2015
03:20 PM
|
0
|
3
|
3888
|
POST
|
Got it to work to a degree: used the following for esri.ux.layers.ClusterLayer-debug.js file. define([ "dojo/_base/declare", "esri/layers/GraphicsLayer", "dojox/lang/functional", "dojox/lang/functional/lambda", "dojox/lang/functional/curry", "dojox/lang/functional/fold" ], function ( declare, GraphicsLayer ) { return declare([GraphicsLayer], { constructor: function (options) { ... //rest of it like the esri.ux.layers.ClusterLayer-debug.js file // sorry may not be allowed to post the rest of it due to company privacy // please see below comments }); }); Also at every "new esri.geometry.Point(...)" statement has to be converted to new esri.geometry.Point(..., this._map.spatialReference) where the spatial reference has to be specified, else it will default to 4326. Also lot of the references to map was bombing out as null. I just replaced them with this._map which is being set in the constructor.
... View more
01-20-2015
04:43 PM
|
1
|
6
|
545
|
POST
|
I am trying to do the same: Would it be possible on the _createWebMap: function (itemInfo) { } function instead of using the arcgisUtils.createMap(itemInfo, "mapDiv", { usePopupManager: true, bingMapsKey: this.config.bingKey }); to take the parameters passed in as itemInfo, to use those to build the leaflet map? Some of the options passed into the itemInfo are: - baseMap and - operationalLayers These could for e.g. be used to create the leaflet map and to add initial basemap to it, and also the operational (feature, tiled, or dyanmic) map layers. My other question is how some of the built in esri widgets like the basemapgallery or measure tools would interact with the leaflet api. For e.g. these esri widgets take map as a parameter. It may not be possible to just pass in the leaflet map object to that parameter, nor would it be that the leaflet map would expose an underlying map object that would be compatible. The other option might be to forgo the esri widgets to use corresponding leaflet plugins. Disclaimer: just investigating these things myself, or started to. Above claims may or may not work. Thanks.
... View more
01-16-2015
02:00 PM
|
0
|
0
|
1962
|
POST
|
Got proxy (.Net) version set up. Added Access-Control-Allow-Origin, * to the Http Response Headers for the proxy site. Without it was getting Access-Control-Allow-Origin not found error for the webmap website that was calling the proxy web server. But with the Access-Control-Allow-Origin, * getting a different set of errors: Multiple Access-Control-Allow-Origin headers are not allowed for CORS response Not defining Access-Control-Allow-Origin anywhere else in the webmap. What's the best way to remove these errors or setup the Access-Control-Allow-Origin on the proxy webserver to avoid either the Access-Control-Allow-Origin error or the Multiple Access-Control-Allow-Origin headers error?
... View more
01-12-2015
04:20 PM
|
0
|
0
|
2893
|
POST
|
Set up proxy and using https: Getting following error: DOM7011: The code on this page disabled back and forward caching. For more information, see: http://go.microsoft.com/fwlink/?LinkID=291337 File: localhost:44300 HTML1300: Navigation occurred. File: localhost:44300 SyntaxError: Invalid character { [functions]: , __proto__: { [functions]: , __proto__: { [functions]: , __proto__: { }, message: "", name: "Error" }, message: "", name: "SyntaxError" }, description: "Invalid character", message: "Invalid character", name: "SyntaxError", number: -2146827274, response: { [functions]: , __proto__: { }, loaded: 4948, options: { [functions]: , __proto__: { }, data: null, handleAs: "json", method: "GET", query: null, sync: false }, status: 404, text: "<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>IIS 8.0 Detailed Error - 404.0 - Not Found</title> <style type="text/css"> <!-- body{margin:0;font-size:.7em;font-family:Verdana,Arial,Helvetica,sans-serif;} code{margin:0;color:#006600;font-size:1.1em;font-weight:bold;} .config_source code{font-size:.8em;color:#000000;} pre{margin:0;font-size:1.4em;word-wrap:break-word;} ul,ol{margin:10px 0 10px 5px;} ul.first,ol.first{margin-top:5px;} fieldset{padding:0 15px 10px 15px;word-break:break-all;} .summary-container fieldset{padding-bottom:5px;margin-top:4px;} legend.no-expand-all{padding:2px 15px 4px 10px;margin:0 0 0 -12px;} legend{color:#333333;;margin:4px 0 8px -12px;_margin-top:0px; font-weight:bold;font-size:1em;} a:link,a:visited{color:#007EFF;font-weight:bold;} a:hover{text-decoration:none;} h1{font-size:2.4em;margin:0;color:#FFF;} h2{font-size:1.7em;margin:0;color:#CC000", total: 4948, url: "/cbtree/errors/CBTErrors.json", xhr: { } }, stack: "SyntaxError: Invalid character at a.json (https://js.arcgis.com/3.12/init.js:242:173) at n (https://js.arcgis.com/3.12/init.js:240:331) at q (https://js.arcgis.com/3.12/init.js:160:111) at f (https://js.arcgis.com/3.12/init.js:164:199)" } SEC7118: XMLHttpRequest for https://www.ocsdev.oceaneering.com/arcgis-proxy/proxy.jsp?https://www.arcgis.com/sharing/content/items/ff059842a1604070bf52492963ae7a03?f=json required Cross Origin Resource Sharing (CORS). File: localhost:44300 SEC7118: XMLHttpRequest for https://www.ocsdev.oceaneering.com/arcgis-proxy/proxy.jsp?https://www.arcgis.com/sharing/rest/portals/self?f=json required Cross Origin Resource Sharing (CORS). File: localhost:44300 SyntaxError: Invalid character { [functions]: , __proto__: { }, description: "Invalid character", log: undefined, message: "Invalid character", name: "SyntaxError", number: -2146827274, stack: "SyntaxError: Invalid character at b.fromJson (https://js.arcgis.com/3.12/init.js:230:409) at b.contentHandlers.json (https://js.arcgis.com/3.12/init.js:187:383) at s (https://js.arcgis.com/3.12/init.js:192:59) at c (https://js.arcgis.com/3.12/init.js:76:215) at d (https://js.arcgis.com/3.12/init.js:76:10) at callback (https://js.arcgis.com/3.12/init.js:77:350) at Anonymous function (https://js.arcgis.com/3.12/init.js:195:298) at k (https://js.arcgis.com/3.12/init.js:199:425) at m (https://js.arcgis.com/3.12/init.js:199:357) at resolve (https://js.arcgis.com/3.12/init.js:201:441)" } SyntaxError: Invalid character { [functions]: , __proto__: { }, description: "Invalid character", log: undefined, message: "Invalid character", name: "SyntaxError", number: -2146827274, stack: "SyntaxError: Invalid character at b.fromJson (https://js.arcgis.com/3.12/init.js:230:409) at b.contentHandlers.json (https://js.arcgis.com/3.12/init.js:187:383) at s (https://js.arcgis.com/3.12/init.js:192:59) at c (https://js.arcgis.com/3.12/init.js:76:215) at d (https://js.arcgis.com/3.12/init.js:76:10) at callback (https://js.arcgis.com/3.12/init.js:77:350) at Anonymous function (https://js.arcgis.com/3.12/init.js:195:298) at k (https://js.arcgis.com/3.12/init.js:199:425) at m (https://js.arcgis.com/3.12/init.js:199:357) at resolve (https://js.arcgis.com/3.12/init.js:201:441)" }
... View more
01-08-2015
08:21 AM
|
0
|
2
|
2893
|
POST
|
Full error: Error: esri.config.defaults.io.proxyUrl is not set. If making a request to a CORS enabled server, please push the domain into esri.config.defaults.io.corsEnabledServers.
... View more
01-07-2015
03:29 PM
|
0
|
0
|
2893
|
POST
|
It happens just before the authentication popup dialog should appear.
... View more
01-07-2015
03:25 PM
|
0
|
0
|
2893
|
Title | Kudos | Posted |
---|---|---|
1 | 01-20-2015 04:43 PM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|