POST
|
We have just had a web app fail due to a syntax error that was caused by the returned value of the eval() function. See this document for reasons not to use eval(). I've replaced this function with JSON.parse() and this has gotten our web app running again. Can anyone tell me why ESRI is using eval() in their code when it is known to cause problems?
... View more
11-12-2018
06:27 PM
|
0
|
4
|
1552
|
POST
|
I'm unable to connect to one of our enterprise databases. This problem first presented 4 days ago. I believe, but I'm not sure, that this was coincident with an edit session on this connection. The full message displayed by the ArcMap Connect popup is: Failed to connect to database. Target state not found in the STATES table [sde.DEFAULT][STATE_ID = 623]. These are the results of queries against the SQL Server database state tables: SELECT TOP (1000) [lineage_name]
,[lineage_id]
FROM [Community].[sde].[SDE_state_lineages] lineage_name lineage_id 1 0 0 2 267 622 SELECT TOP (1000) [state_id]
,[owner]
,[creation_time]
,[closing_time]
,[parent_state_id]
,[lineage_name]
FROM [Community].[sde].[SDE_states] state_id owner creation_time closing_time parent_state_id lineage_name 1 0 sde 2016-08-16 10:42:47.000 2016-08-16 10:42:47.000 0 0 2 622 GISADMIN 2018-10-23 16:40:19.870 2018-10-23 16:40:26.870 265 267 A possible solution would be to add a record to the SDE_state_lineages table having a lineage_id of 623 and also add a record to the SDE_states table having a state_id of 623. I'm reluctant to do this though as I'm not sure that this will not cause inconsistencies between these tables and any possible related tables. Our organisation is running ArcGIS Desktop 10.5 with a SQL Server 2014 SP2 database on Windows 2012 R2. I've added a record to each of the SDE_state_lineages and SDE_states table as I proposed above and this has fixed our connection to this database.
... View more
10-28-2018
03:30 PM
|
1
|
0
|
1869
|
POST
|
I'm using ArcGIS JS 4.6. I can't get images to display in my popups on mobile devices when using Chrome, neither iOS or Android Chrome browsers will work. Safari on iOS works fine. When I inspect the DOM while running the webpage in the Chrome device emulator as iPhone 6/7/8 I see the attributes of the img tag as this: But doing this for Galaxy S5 gives this: Notice the size here is 0 x 0 pixels, but the one that is working properly is 180 x 135 pixels. This is my code for the popup template content property function getPlayGroundPopupContent(feature) {
var retVal = [];
var assetId = feature.graphic.attributes.assetId;
_siteImage = "https://.../maps/playgrounds/images/" + assetId + ".jpg";
var text;
text = {
type: "text",
text: "<span class='playgrounds-expression-toilet'>{expression/toilet}</span></br>{playEquip}"
};
var media = {
type: "media",
mediaInfos: [{
type: "image",
value: {
sourceURL: "https://.../maps/playgrounds/images/" + assetId + ".jpg"
}
}]
};
retVal.push(text);
retVal.push(media);
return retVal;
} Updated I've solved this problem. My stylesheet was hiding this element in a media query. This was the css: .esri-popup-renderer__content-element:last-child {
display: none;
}
... View more
10-15-2018
08:54 PM
|
0
|
0
|
731
|
POST
|
Hi Andrew, Do you have the tag below in your setting.html? <input data-dojo-attach-point="textNode" data-dojo-type="dijit/form/TextBox" id="versionTextBox" />
... View more
08-23-2018
02:22 PM
|
0
|
1
|
2001
|
POST
|
How about creating another layer from the same data and set it's elevationinfo like this: elevationInfo: {
mode: "onTheGround"
}, Then apply your popuptemplate to this layer instead of the other one
... View more
06-19-2018
04:47 PM
|
0
|
1
|
1173
|
POST
|
Andrew, Maybe try adding the z-coordinate (elevation) to the location of the popup.
... View more
06-14-2018
09:33 PM
|
0
|
3
|
1173
|
POST
|
Pratik, Here's a sample. Create a local scene | ArcGIS API for JavaScript 4.7 Mouse right click and move up and down to tilt the scene.
... View more
06-14-2018
09:15 PM
|
0
|
0
|
262
|
POST
|
I have an extension in Firefox called Privacy Badger. When I disabled that it worked.
... View more
05-30-2018
02:08 PM
|
0
|
0
|
935
|
POST
|
Yeah, it’s Firefox that’s the problem. It even works in IE.
... View more
05-30-2018
02:06 PM
|
0
|
0
|
748
|
POST
|
This one isn’t working. http://gis.calhouncounty.org/WAB/V2.7/widgets/eSearch/index.html?esearch=I-71&slayer=1&exprnum=0
... View more
05-30-2018
01:41 PM
|
0
|
3
|
748
|
POST
|
Hi Robert, just a heads up about your Live Preview site. It's showing an error: Unable to load the base map layer (Unable to load https://services.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer?f=json status: 0 [url:http://services.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer])
... View more
05-28-2018
02:23 PM
|
0
|
5
|
748
|
POST
|
This is the modified settings.js without the call to registry.byId. Line 85 is where I've changed it to your suggested code. define([
'dojo/_base/declare',
'dijit/_WidgetsInTemplateMixin',
'jimu/BaseWidgetSetting',
'esri/request',
'esri/domUtils',
'dojo/parser',
'dojo/Deferred',
'dojo/_base/lang',
'dojo/_base/connect',
'dojo/_base/array',
'dojo/request/script',
'dojo/dom-construct',
'dojo/query',
'dojo/on',
'dijit/form/Button',
'dijit/form/TextBox',
'dijit/registry'
],
function (declare,
_WidgetsInTemplateMixin,
BaseWidgetSetting,
esriRequest,
domUtils,
parser,
Deferred,
lang,
connect,
arrayUtils,
script,
domConstruct,
query,
on,
Button,
TextBox,
registry) {
return declare([BaseWidgetSetting], {
baseClass: 'jimu-widget-clusterer-setting',
_layerOrdinal: 0,
// 1.
setConfig: function (config) {
console.log('setConfig');
this.config = config;
},
// 2.
postCreate: function () {
//the config object is passed in
this.setConfig(this.config);
console.log('postCreate');
},
// 3.
startup: function () {
console.log('startUp');
this.inherited(arguments);
parser.parse();
arrayUtils.forEach(this.config.featureLayers, lang.hitch(this, function (layer) {
var textBox = new TextBox({
class: 'clusterer-featurelayer-textbox',
style: 'width: 600px; margin-top: 5px; margin-bottom: 5px;',
id: 'featureLayerTextbox-' + this._layerOrdinal
});
textBox.set('value', layer);
textBox.placeAt('layersContainerDiv', 'last');
var button = domConstruct.create('div',
{
class: 'jimu-btn',
innerHTML: 'Remove',
style: 'margin-left: 5px',
id: 'removeLayerBtn-' + this._layerOrdinal
},
'layersContainerDiv');
on(button, 'click', this._removeLayerBtnClick);
this._layerOrdinal += 1;
}));
this.maxZoomTextBox.value = this.config.maxZoom;
},
_featureLayerTextBox1: null,
_getfeatureLayerTextBox1: function () {
this._featureLayerTextBox1 = registry.byId('featureLayerTextBox1');
},
getConfig: function () {
console.log('getConfig');
var layers = [];
var textboxes = query('.clusterer-featurelayer-textbox');
arrayUtils.forEach(textboxes, lang.hitch(this, function (box) {
var textbox = registry.byNode(box);
layers.push(textbox.get('value'));
}));
var maxZoomTextBoxValue = this.maxZoomTextBox.value;
//WAB will get config object through this method
return {
maxZoom: maxZoomTextBoxValue,
featureLayers: layers
};
},
_writeSearchREST: function () {
this.config.maxZoom = this.getConfig().maxZoom;
this.config.featureLayers = this.getConfig().featureLayers;
},
_onBtnAddFeaturelayerClicked: function () {
var textBox = new TextBox({
class: 'clusterer-featurelayer-textbox',
style: 'width: 600px; margin-top: 5px; margin-bottom: 5px;',
id: 'featureLayerTextbox-' + this._layerOrdinal
});
textBox.placeAt('layersContainerDiv', 'last');
var button = domConstruct.create('div',
{
class: 'jimu-btn',
innerHTML: 'Remove',
style: 'margin-left: 5px',
id: 'removeLayerBtn-' + this._layerOrdinal
},
'layersContainerDiv');
on(button, 'click', this._removeLayerBtnClick);
this._layerOrdinal += 1;
},
_onBtnSaveLayersClicked: function () {
this._writeSearchREST();
},
_removeLayerBtnClick: function (event) {
var id = event.target.id;
var ordinal = id.split('-')[1];
var textbox = registry.byId('featureLayerTextbox-' + ordinal);
textbox.destroy(false);
domConstruct.destroy('removeLayerBtn-' + ordinal);
}
});
});
... View more
05-17-2018
07:34 PM
|
0
|
1
|
566
|
POST
|
Yes, it appears to be an ordinary HTML textbox, even though I've added the data-dojo-type="dijit/form/TextBox" attribute. I had thought this would add it to the DOM as a true dijit as happens in ESRI's Coordinate Conversion widget for the scale numbertextbox. But as you said earlier I was going about it in a cumbersome way, although it used to work, and I'm now just referencing the object with this.maxZoomTextbox, which works. Thanks.
... View more
05-17-2018
04:51 PM
|
0
|
3
|
566
|
POST
|
I already had dijit/form/TextBox, and just now added widgetsInTemplateMixin, but it made no difference.
... View more
05-17-2018
03:20 PM
|
0
|
6
|
1869
|
POST
|
Hi Robert, I'm now doing that, but registry.byId is still returning undefined when I go registry.byId(this.maxZoomTextBox.id)
... View more
05-17-2018
03:15 PM
|
0
|
1
|
1869
|
Title | Kudos | Posted |
---|---|---|
1 | 11-27-2016 01:34 PM | |
1 | 05-13-2015 09:27 PM | |
1 | 06-09-2015 03:18 PM | |
1 | 06-24-2015 06:22 PM | |
1 | 07-07-2015 03:17 PM |
Online Status |
Offline
|
Date Last Visited |
03-22-2021
03:45 PM
|