POST
|
I managed to create a VectorTileLayer and add it to my map (code at the end of this question). My question is: How I can change the styling of data in a vector tile layer without it having to reload all data in the viewport? My dataset is quite big (about 1MB at zoom level 13+) and I want to avoid too much traffic. I searched GeoNET and found a few threads about styling and changing styling, for example: Changing ocean color in Vector Style Editor? Adding Custom Style to Vector Tiles Vector Tiles and Styles (not Javascript, but quite similar to my question) The ArcGIS Javascript 4.9 API documentation on Vector Tiles says (emphasis mine): Styles may contain multiple options for rendering the same type of feature. In a street layer, for example, major highways might have three symbology options. The symbology can be changed on the client without having to make a request for a new tile from the server. However I am unable to find any working examples where styles are changed live and without additional requests. The ArcGIS Vector Style Editor has this issue as well. What I tried: Overwriting my layer's "style" property, no visible change Overwriting my layer's "currentStyleInfo" property, no visible change Poke around in some other internal properties... no visible change Use layer.loadStyle(JSONObject) - applies the new styling, but reloads all data Provide a few styles in the initial styles "layers" property - only the last style provided is applied, how do I change between those? Example code: - creates a VectorTileLayer - styling is circles that have a color ramp fill-color based on an attribute var vtLayer = new VectorTileLayer({
minScale: 140000,
style: {
"version": 8,
"sprite": "https://example.com/VectorTileServer/resources/sprites/sprite",
"glyphs": "https://example.com/VectorTileServer/resources/fonts/{fontstack}/{range}.pbf",
"sources": {
"esri": {
"type": "vector",
"url": "https://example.com/VectorTileServer"
}
},
"layers": [
{
"id": "my_attrib/min",
"type": "circle",
"source": "esri",
"source-layer": "my_attrib",
"filter": [
"==",
"_symbol",
2
],
"layout": {
"icon-image": "my_attrib/min",
"icon-allow-overlap": true
},
"paint": {
"circle-radius": 5,
"circle-stroke-width": 1,
"circle-stroke-color": "#FFFFFF",
"circle-color": {
"property": "my_attribute",
"default": "#000000",
"stops": [
[-10, "#FF0000"],
[-5, "#FFFF00"],
[0, "#00FF00"],
[5, "#00FFFF"],
[10, "#0000FF"]
]
}
}
}
]
}
});
... View more
10-30-2018
10:00 AM
|
0
|
2
|
1724
|
POST
|
I solved problem number 1. Input connector settings: Construct Geometry From Fields: Yes X Geometry Field: x Y Geometry Field: y Z Geometry Field: (empty) WKID Field or Default WKID: wkid GeoEvent Definition corresponding fields: x - Float y - Float wkid - Integer geometry - Geometry (last field in the definition) Then submit your data like this (in case of the TCP input reader), the "geometry" is simply left out (already supplied from x,y data): x y wkid
otherdata,1234.1234,5678.5678,25832
... View more
07-18-2017
03:24 AM
|
1
|
0
|
250
|
POST
|
I have a 10.5 Geoevent setup with an Elasticsearch Big Data Store on a separate host. Question 1: I'm pushing events over a TCP Socket in a comma separated list. After some trial and error I found that the geometry format looks something like this: ...,othervalue,"51.0,7.2",othervalue,... Is it possible to specify a CRS here, maybe en EPSG code, Z value...? I couldn't find detailed documentation on how data types have to be formatted. Question 2: One of my Elasticsearch BDS writers failed to output data, the cause of this was that I put an "Update Features" instead of "Add Features" output. While looking for the cause of this, I noticed that the logs on my server (C:\...\logs\example.com\elasticlog) were always empty (0 byte). The ArcGIS Server/GeoEvent Manager's logs didn't show anything useful either on "DEBUG". I tried to change the log level in \elasticsearch_2.3.2\config\logging.yml from "ERROR" to "DEBUG", but that didn't change anything -- How can I log failed INSERT and UPDATE attempts in the Elasticsearch BDS?
... View more
06-07-2017
03:07 AM
|
0
|
1
|
583
|
Title | Kudos | Posted |
---|---|---|
1 | 07-18-2017 03:24 AM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|