|
DOC
|
Then there is an issue with your network/firewall not allowing access to that url then. Not sure what to tell you there.
... View more
08-24-2020
09:12 AM
|
0
|
0
|
20826
|
|
POST
|
Michael, The further increase would be like esri shooting themselves in the foot. Why will people need to buy desktop software is they can do everything online without purchasing any software to do it. Oh course this is just my opinion.
... View more
08-24-2020
06:21 AM
|
2
|
5
|
3671
|
|
POST
|
Jared, There is no widget built for this as this is basic html creation and css styling. How can I create and style a div using JavaScript? - Stack Overflow
... View more
08-24-2020
05:47 AM
|
1
|
0
|
1002
|
|
POST
|
George, Here is some code for smooth hover popups. <!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no" />
<title>Smooth Hover Popup</title>
<link rel="stylesheet" href="https://js.arcgis.com/4.15/esri/themes/light/main.css" />
<style>
html,
body,
#viewDiv {
padding: 0;
margin: 0;
height: 100%;
width: 100%;
}
</style>
<script src="https://js.arcgis.com/4.15/"></script>
<script>
var populationChange;
require([
"esri/Map",
"esri/views/MapView",
"esri/layers/Layer"
], function (Map, MapView, Layer) {
var map = new Map({
basemap: "dark-gray"
});
// Create the MapView
var view = new MapView({
container: "viewDiv",
map: map,
zoom: 7,
center: [-87, 34]
});
Layer.fromPortalItem({
portalItem: {
// autocasts as new PortalItem()
id: "e8f85b4982a24210b9c8aa20ba4e1bf7"
}
}).then(function (layer) {
// add the layer to the map
layer.outFields = ["*"];
map.add(layer);
view.when().then((_) => {
view.whenLayerView(layer).then((layerView) => {
let lResult = {attributes:{NAME:null}};
view.on("pointer-move", (event) => {
view.hitTest(event).then(({
results
}) => {
const result = results[0];
if (result) {
if(result.graphic.layer.id === layer.id){
if(lResult.attributes.NAME !== result.graphic.attributes.NAME){
view.popup.open({
features: [result.graphic],
location: result.graphic.geometry.extent.center
});
lResult = result.graphic;
}
}
}else{
view.popup.close();
}
});
});
});
});
// Create a new popupTemplate for the layer and
// format the numeric field values using the FieldInfoFormat properties. Call the custom populationChange()
// function to calculate percent change for the county.
var popupTemplate = {
// autocasts as new PopupTemplate()
title: "Population in {NAME}",
outFields: ["*"],
content: populationChange,
fieldInfos: [{
fieldName: "POP2010",
format: {
digitSeparator: true,
places: 0
}
},
{
fieldName: "POP10_SQMI",
format: {
digitSeparator: true,
places: 2
}
},
{
fieldName: "POP2013",
format: {
digitSeparator: true,
places: 0
}
},
{
fieldName: "POP13_SQMI",
format: {
digitSeparator: true,
places: 2
}
}
]
};
layer.popupTemplate = popupTemplate;
function populationChange(feature) {
var div = document.createElement("div");
var upArrow =
'<svg width="16" height="16" ><polygon points="14.14 7.07 7.07 0 0 7.07 4.07 7.07 4.07 16 10.07 16 10.07 7.07 14.14 7.07" style="fill:green"/></svg>';
var downArrow =
'<svg width="16" height="16"><polygon points="0 8.93 7.07 16 14.14 8.93 10.07 8.93 10.07 0 4.07 0 4.07 8.93 0 8.93" style="fill:red"/></svg>';
// Calculate the population percent change from 2010 to 2013.
var diff =
feature.graphic.attributes.POP2013 - feature.graphic.attributes.POP2010;
var pctChange = (diff * 100) / feature.graphic.attributes.POP2010;
var arrow = diff > 0 ? upArrow : downArrow;
// Add green arrow if the percent change is positive and a red arrow for negative percent change.
div.innerHTML =
"As of 2010, the total population in this area was <b>" +
feature.graphic.attributes.POP2010 +
"</b> and the density was <b>" +
feature.graphic.attributes.POP10_SQMI +
"</b> sq mi. As of 2013, the total population was <b>" +
feature.graphic.attributes.POP2013 +
"</b> and the density was <b>" +
feature.graphic.attributes.POP13_SQMI +
"</b> sq mi. <br/> <br/>" +
"Percent change is " +
arrow +
"<span style='color: " +
(pctChange < 0 ? "red" : "green") +
";'>" +
pctChange.toFixed(3) +
"%</span>";
return div;
}
});
});
</script>
</head>
<body>
<div id="viewDiv"></div>
</body>
</html>
... View more
08-24-2020
05:44 AM
|
2
|
1
|
6133
|
|
DOC
|
Kiro, Have you looked at the widgets help link? https://gis.calhouncounty.org/WAB/V2.15/widgets/Identify/widgets/Identify/help/identify_Help.htm
... View more
08-24-2020
05:23 AM
|
0
|
0
|
20826
|
|
POST
|
Michael, When using the REST API's generate method there is always going to be a limit to what esri allows. It is great that you are getting 4000 records I remember when the limit has been 1000 records. WAB and esri's JS API were never meant to be a replacement for ArcGIS Desktop, so there will always be limits to what you can do online.
... View more
08-24-2020
05:21 AM
|
2
|
7
|
3671
|
|
POST
|
Kevin, Here is a more simple one line solution: this.appConfig.getConfigElementById(this.widgetId).config
... View more
08-21-2020
09:50 AM
|
2
|
0
|
2007
|
|
POST
|
Kevin, How would the widget not be loaded if this is a feature action of that widget?... I use a test like this to make sure the action is only shown for a particular widget. isFeatureSupported: function(featureSet, layer){
var supported = false;
supported = featureSet.features.length > 1 && layer;
var tWidget = WidgetManager.getInstance().getWidgetById(this.widgetId);
if(tWidget && tWidget.state === 'active'){
return supported;
}else{
return false;
};
},
... View more
08-21-2020
09:33 AM
|
0
|
2
|
2007
|
|
POST
|
Vakhtang, Your code logic is pretty mixed up. You have to many view click event handlers. Se my comments in the code below. view.on("click", function(event) {
view.hitTest(event)
.then(getGraphics);
})
function getGraphics(response) {
var graphic = response.results[0].graphic;
//right here you have the feature that was clicked
//so why are you not setting the FeatureForm feature attribute?
var attributes = graphic.attributes;
var ido = graphic.layer;
console.log(ido)
const featureForm = new FeatureForm({
container: "formDiv",
layer: ido,
fieldConfig: [
{
name: "komentari",
label:"komentari",
}
]
});
//Not sure what this next line is for
document.getElementById(formDiv)
//What you need is something like this.
featureForm.feature = graphic;
Forget your whole selectExistingFeature where you add another view click handler (this is the reason you have to click twice).
... View more
08-21-2020
08:01 AM
|
2
|
1
|
4428
|
|
POST
|
Try changing the sketch widgets creationMode property to continuous instead of update. https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Sketch.html#creationMode
... View more
08-21-2020
05:32 AM
|
2
|
1
|
3293
|
|
DOC
|
Kiro, Do not manually edit the config.json. The widget includes a settings dialog that allows for the widgets configuration. When you add the widget to a new WAB app the settings dialog should appear automatically in WAB.
... View more
08-21-2020
05:21 AM
|
0
|
0
|
20826
|
|
DOC
|
Amy, You will have to search the Widget.js file for this line: this.tabContainer.selectTab(this.nls.resultslabel); and replace it with these lines: if (this.rsltsTab) {
this.tabContainer.selectTab(this.nls.resultslabel);
} I will get this fixed in my 2.16 release of the widget very soon.
... View more
08-20-2020
04:17 PM
|
0
|
0
|
18474
|
| 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
|