Comments (4)
See also #72, a fairly reliable way to trigger this problem.
from cmv-app.
Errors captured when investigating this with the user:
description: "Unable to get property 'spatialReference' of undefined or null reference",
message: "Unable to get property 'spatialReference' of undefined or null reference",
name: "TypeError",
number: -2146823281,
stack: "TypeError: Unable to get property 'spatialReference' of undefined or null reference
at simplify (https://js.arcgis.com/3.29/:2697:351)
at Anonymous function (https://www.fla-etat.org/est/secure/map/js/gis/dijit/AoiEditor.js:6:19670)
at _buildAnalysisAreaBufferEdits (https://www.fla-etat.org/est/secure/map/js/gis/dijit/AoiEditor.js:6:19549)
at saveAnalysisAreaBuffers (https://www.fla-etat.org/est/secure/map/js/gis/dijit/AoiEditor.js:6:7266)
at Anonymous function (https://www.fla-etat.org/est/secure/map/js/gis/dijit/AoiEditor.js:6:6203)
at l (https://js.arcgis.com/3.29/:108:242)
at k (https://js.arcgis.com/3.29/:108:174)
at resolve (https://js.arcgis.com/3.29/:110:267)
at Anonymous function (https://www.fla-etat.org/est/secure/map/js/gis/dijit/AoiEditor.js:6:7192)"
}
TypeError: Cannot read property 'spatialReference' of undefined
at Object.simplify ((index):2697)
at AoiEditor.js:formatted:793
at Array.forEach ()
at Object._buildAnalysisAreaBufferEdits (AoiEditor.js:formatted:787)
at Object.saveAnalysisAreaBuffers (AoiEditor.js:formatted:287)
at AoiEditor.js:formatted:229
at l ((index):108)
at k ((index):108)
at e.resolve ((index):110)
at callback (AoiEditor.js:formatted:274) "TypeError: Cannot read property 'spatialReference' of undefined
at Object.simplify (https://js.arcgis.com/3.29/:2697:362)
at https://www.fla-etat.org/est/secure/map/js/gis/dijit/AoiEditor.js:6:19706
at Array.forEach ()
at Object._buildAnalysisAreaBufferEdits (https://www.fla-etat.org/est/secure/map/js/gis/dijit/AoiEditor.js:6:19558)
at Object.saveAnalysisAreaBuffers (https://www.fla-etat.org/est/secure/map/js/gis/dijit/AoiEditor.js:6:7278)
at https://www.fla-etat.org/est/secure/map/js/gis/dijit/AoiEditor.js:6:6205
at l (https://js.arcgis.com/3.29/:108:248)
at k (https://js.arcgis.com/3.29/:108:174)
at e.resolve (https://js.arcgis.com/3.29/:110:267)
at callback (https://www.fla-etat.org/est/secure/map/js/gis/dijit/AoiEditor.js:6:7111)
----------------------------------------
rejected at a (https://js.arcgis.com/3.29/:109:154)
at l (https://js.arcgis.com/3.29/:108:407)
at k (https://js.arcgis.com/3.29/:108:174)
at e.resolve (https://js.arcgis.com/3.29/:110:267)
at callback (https://www.fla-etat.org/est/secure/map/js/gis/dijit/AoiEditor.js:6:7111)
at https://www.fla-etat.org/est/dwr3/engine.js:1037:35
at Object.logHandlerEx (https://www.fla-etat.org/est/dwr3/engine.js:2553:9)
at Object.handleCallback (https://www.fla-etat.org/est/dwr3/engine.js:1033:29)
at eval (eval at dwr.engine._executeScript (https://www.fla-etat.org/est/dwr3/engine.js:720:6), :10:19)
at eval (eval at dwr.engine._executeScript (https://www.fla-etat.org/est/dwr3/engine.js:720:6), :11:3)
----------------------------------------
Error
at e.then.b.then (https://js.arcgis.com/3.29/:111:77)
at Object.saveAnalysisAreasAndShowAnalysisOptions (https://www.fla-etat.org/est/secure/map/js/gis/dijit/AoiEditor.js:6:6187)
at HTMLSpanElement. (https://www.fla-etat.org/est/secure/map/js/knockout-latest.js:6:42326)
at HTMLSpanElement.dispatch (https://code.jquery.com/jquery-3.3.1.min.js:2:41772)
at HTMLSpanElement.y.handle (https://code.jquery.com/jquery-3.3.1.min.js:2:39791)"
m @ (index):115
(anonymous) @ (index):115
filter @ (index):72
l @ (index):115
relevant minified/expanded (but enough to narrow down in real source) code:
_buildAnalysisAreaBufferEdits: function() {
var a = this;
this._buildAnalysisAreasFromFeatures(),
this.loadingOverlay.show("Constructing analysis area buffers...");
var e = this.layers.analysisAreaBuffer.graphics
, t = this.analysisAreas()
, n = {
adds: [],
updates: [],
deletes: e.filter(function(e) {
return !this.getAnalysisAreaModel(e.attributes.FK_PROJECT_ALT)
}, this)
}
, s = new b
, o = [];
return t.forEach(function(i) {
var r = new b
, e = i.features().map(function(e) {
return (e.buffer || e.graphic).geometry
});
o.push(r),
esriConfig.defaults.geometryService.simplify(e).then(function(e) {
Stepping through t.forEach above, altNumber=1, features [{...geometry.paths[42]... seems ok
But it still wants to try to work through the empty analysis area, even after I delete the feature and reload, and remnant record in t_project_alt_aoi is a problem somehow
reload whole viewer
from cmv-app.
Perhaps related, I note a few new issues not reported by users:
- You can click Next from feature editing screen in circumstances when you shouldn't:
- While actively drawing a polygon or line
- Before drawing any features or after deleting all features
- You can give a point or line feature a 0 buffer, resulting in failure somewhere along the way after clicking Next on Analysis Areas screen. Note the "todo validate"... comment on line 314.
from cmv-app.
Further testing with Mike today, we observed behavior which seems to indicate that clicking Next too quickly after finishing the creation of a line (not extracting) gets it into the state where the "Unable to get property 'spatialReference' of undefined or null reference" exception occurs. First attempt to fix will be disabling the Next button while the user is interactively working on a feature (still in drawing mode, or a recent drag of a feature vertex), and re-enabling after on-the-fly saving is complete.
from cmv-app.
Related Issues (20)
- Attributes table widget should support dynamic layers containing feature layers with definition expressions HOT 2
- Layer Loader widget needs to support tiled map services
- Bug 5979 - Map viewer needs to handle links from outdated GIS analysis results to open layers that are no longer available
- Removing map services containing folders breaks layer control HOT 4
- AOI editor must support requesting new "intersecting" sociocultural data report (SDR)
- Enhancements to support PA in SWEPT: load multiple layers; zoom to SWEPT project
- Identify results of project layers should use standard attribute names and symbology. HOT 1
- Project Editor needs support for direct link to edit a specific project alt HOT 2
- Use EST-hosted jQuery/jQueryUI instead of jQuery.com CDN HOT 2
- Error starting GIS Analysis
- Display layer description in Layer Browser
- AOI Results Screen Enhancement Suggestion
- Bug 6320 - AOI expiration date should be updated when a user edits an expired AOI HOT 2
- Provide clearer feedback on AOI analysis/map generation progress
- Include new fields in Layer Loader Browser and Search Results HOT 2
- Bug 6329 - Provide access to download archived versions of map viewer/analysis layers HOT 1
- Bug 6339 - Support Loading Project Highlight
- Public Site Map Updates HOT 1
- Update link to HardCopyMaps page
- Thematic maps icons should be slightly larger, clickable, with more space between items HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cmv-app.