POST
|
Hello, In my app I have many layers created from feature collection in the code. I would need to incorporate this layers into Search and Query widgets. Is it somehow possible? Thanks a lot. Zdenek
... View more
08-28-2018
06:13 AM
|
0
|
0
|
279
|
POST
|
Robert, thank you again. I have one more problem with automatic refreshing of the AttTable. I have a next widget which ask for data every minute. When the AttTable is opened I would like to automatic refresh it everytime when the request is called. I tried an approach with communication between widgets but unsuccessfully. Was it a good approach?
... View more
02-28-2018
12:46 PM
|
0
|
1
|
1147
|
POST
|
Robert, thank you a lot! One additional question...if I want this sorting only for one layer and for all others sorting by objectIdField? I tried add else if condition with the original code below changed if condition but it wasn't obviously good aproach.
... View more
02-20-2018
11:51 AM
|
0
|
2
|
642
|
POST
|
Robert, It works! but..... It works only when I push Refresh in the Attribute Table. When I open Attribute Table from Layer List widget or from arrow in the bottom of the screen the row is white and when a push Refresh it turns red. Do you have any idea how to make it red for first open?
... View more
02-20-2018
11:15 AM
|
0
|
5
|
2079
|
POST
|
Robert, thank you for your reply. I did additions you advised but nothing changed. My feature class is made from feature collection in the code. Could it be a problem? I have a field "Severity" and if it has value of "1" I need red row so I changed your code to if(object.Severity === '1')
... View more
02-20-2018
10:37 AM
|
0
|
10
|
2079
|
POST
|
Hello, is it possible to automatic sort values in the Attribute Table after the Table is shown in the app? What I need is to see rows with error attribute automatic on the first places. Thanks a lot Regards Zdenek
... View more
02-17-2018
10:07 AM
|
0
|
4
|
817
|
POST
|
Hello, is it possible to customize the Attribute Table in Web AppBuilder App based on attribute of features? What I need is change color of the row if some attribute has error state. Thanks a lot Regards Zdenek
... View more
02-17-2018
10:03 AM
|
2
|
34
|
5166
|
POST
|
Robert, I found the error in my code. Default symbol wasn't a symbol object. Now it works! Thanks a lot
... View more
11-07-2017
12:34 PM
|
0
|
0
|
134
|
POST
|
Yes, data's color field is upper case. And I commented the whole part drawingInfo and still nothing in my map.
... View more
11-07-2017
12:28 PM
|
0
|
1
|
1078
|
POST
|
Here it is. startup: function () {
this.inherited(arguments);
var map = this.map;
var SSZFeatureLayer;
var SSZFeatureCollection = {
"layerDefinition": null,
"featureSet": {
"features": [],
"geometryType": "esriGeometryPoint"
}
};
SSZFeatureCollection.layerDefinition = {
"geometryType": "esriGeometryPoint",
"objectIdField": "ObjectID",
"spatialReference": {
"wkid": 4326,
"latestWkid": 4326
},
"drawingInfo": {
"renderer": {
"type": "simple",
// "symbol": {
// "type": "esriPMS",
// "url": "images/traffic_lights_005826.svg",
// "contentType": "image/svg",
// "width": 17,
// "height": 17
// }
}
},
//"minScale":50000,
"fields": [{
"name": "ObjectID",
"alias": "ObjectID",
"type": "esriFieldTypeOID"
}, {
"name": "serialno",
"alias": "ID zařízení",
"type": "esriFieldTypeString"
}, {
"name": "desc",
"alias": "Popis",
"type": "esriFieldTypeString"
}, {
"name": "devtype",
"alias": "Typ zařízení",
"type": "esriFieldTypeString"
}, {
"name": "locality",
"alias": "Lokalita",
"type": "esriFieldTypeString"
}, {
"name": "street1",
"alias": "Ulice 1",
"type": "esriFieldTypeString"
}, {
"name": "street2",
"alias": "Ulice 2",
"type": "esriFieldTypeString"
}, {
"name": "timeStamp",
"alias": "Zmena stavu",
"type": "esriFieldTypeString"
}, {
"name": "color",
"alias": "Barva",
"type": "esriFieldTypeString"
}]
}
var devPopupTemplate = new PopupTemplate({
title: "<b>Sériové číslo</b>: {serialno}",
//descritpion: "<table><tr><th><b>Popis</b>:</th><th>{desc}</th></tr><tr><th><b>Typ zařízení</b>:</th><th>{devtype}</th></tr><tr><th><b>Lokalita</b>:</th><th>{locality}</th></tr><tr><th><b>Ulice 1</b>:</th><th>{street1}</th></tr><tr><th><b>Ulice 2</b>:</th><th>{street2}</th></tr></table>"
description: "<b>Popis</b>: {desc} </br><b>Typ zařízení</b>: {devtype} </br><b>Lokalita</b>: {locality} </br><b>Ulice 1</b>: {street1} </br><b>Ulice 2</b>: {street2}</br><b>Zmena stavu</b>: {timeStamp} "
});
SSZFeatureLayer = new FeatureLayer(SSZFeatureCollection, {
id: 'SSZ',
infoTemplate: devPopupTemplate,
visible: false,
showLabels: true,
outFields: ["*"]
})
var defaultSymbol = "images/traffic_lights_005826.svg"
var renderer = new UniqueValueRenderer(defaultSymbol, "color");
renderer.addValue("000000",new PictureMarkerSymbol("images/traffic_lights_000000.svg",17,17));
renderer.addValue("0000A0",new PictureMarkerSymbol("images/traffic_lights_0000A0.svg",17,17));
renderer.addValue("0000FF",new PictureMarkerSymbol("images/traffic_lights_0000FF.svg",17,17));
renderer.addValue("7F7F7F",new PictureMarkerSymbol("images/traffic_lights_7F7F7F.svg",17,17));
renderer.addValue("9E0B0E",new PictureMarkerSymbol("images/traffic_lights_9E0B0E.svg",17,17));
renderer.addValue("005826",new PictureMarkerSymbol("images/traffic_lights_005826.svg",17,17));
renderer.addValue("8000FF",new PictureMarkerSymbol("images/traffic_lights_8000FF.svg",17,17));
renderer.addValue("F7901E",new PictureMarkerSymbol("images/traffic_lights_F7901E.svg",17,17));
renderer.addValue("FF0000",new PictureMarkerSymbol("images/traffic_lights_FF0000.svg",17,17));
renderer.addValue("FFF200",new PictureMarkerSymbol("images/traffic_lights_FFF200.svg",17,17));
SSZFeatureLayer.setRenderer(renderer)
SSZFeatureLayer.on("click", function (evt) {
map.infoWindow.setFeatures([evt.graphic]);
});
map.on("layers-add-result", function (results) {
requestDevices();
});
map.addLayers([SSZFeatureLayer])
function requestDevices() { Function to request the data}
}
... View more
11-07-2017
11:54 AM
|
0
|
3
|
1078
|
POST
|
Robert, I tried to implement Unique value renderer and I made some progress but still have some issue. In my Layer List widget it looks good. I have there all needed icons but in map there is nothing. No icons for my features.
... View more
11-07-2017
10:54 AM
|
0
|
5
|
1078
|
POST
|
Ok, I looked what is unique value renderer and it is not usable for me. I have png icons as a symbols and I need to use them.
... View more
11-07-2017
06:56 AM
|
0
|
7
|
1078
|
Title | Kudos | Posted |
---|---|---|
1 | 11-01-2016 06:40 AM | |
1 | 06-21-2017 10:48 PM | |
2 | 02-17-2018 10:03 AM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|