Comments (5)
@sgofferj thanks for trying Wegue!
Helps when sharing your JSON config file (snippet) here and let us know if e.g. geometries and other attrs rendering works and what error messages you get, e.g. in browser console.
The API call above returns GeoJSON with nested properties
, e.g. announcements
is array-type. This structuring may not (yet) be supported by the OpenLayers VectorSource which is instantiated within the Wegue Layer Factory function. Could be that only 'flat' properties
are supported.
from wegue.
If I use one of the flat attributes like "SituationId", it works. Although, it also seems to only display the points, not the MultiLineStrings. Here is the config part:
{
"type": "VECTOR",
"lid": "Traffic",
"name": "Traffic",
"url": "https://tie.digitraffic.fi/api/v3/data/traffic-messages/simple?inactiveHours=0&includeAreaGeometry=true&situationType=TRAFFIC_ANNOUNCEMENT",
"formatConfig": {
},
"format": "GeoJSON",
"visible": true,
"selectable": true,
"hoverable": true,
"hoverAttribute": "announcements[0].title",
"style": {
"radius": 4,
"strokeColor": "red",
"strokeWidth": 5,
"fillColor": "rgba(155,153,51,0.5)",
"label": {
"attribute": "situationId",
"minResolution": 4.0,
"outlineColor": "white",
"outlineWidth": 2,
"fillColor": "black",
"offsetX": 0,
"offsetY": 15,
"align": "center"
}
},
"selectStyle": {
"radius": 10,
"strokeColor": "gray",
"strokeWidth": 5,
"fillColor": "rgb(255, 255, 0, 0.2)"
},
"doAppendSelectStyle": true
},
Ah, so that's all from Openlayers. I'm not familiar with that at all. I have tinkered with Leaflet before.
from wegue.
Hi @sgofferj,
as @justb4 pointed out, the default tooltip only supports plain attributes. You can hovever accomplish this by implementing a custom map overlay as documented in the reusable-component section.
from wegue.
Also the GeoJSON returned from the API has "mixed" geometries: null
, MultiLineString
and Point
.
Don't know how that would be rendered by the Style. This GeoJSON validator: https://www.itb.ec.europa.eu/json/geojson/upload does not seem to be allowing null
when validating as GeoJSON FeatureCollection.
from wegue.
Oh, I see. I see how easy Vue is to understand then :).
from wegue.
Related Issues (20)
- Manage TileGrids in LayerFactory instead of MapComponent HOT 1
- Enforce Vuetify ESLint rules. HOT 4
- Streamline console logging behavior.
- Optimize bundle size
- Upgrade to latest OpenLayers HOT 1
- Upgrade to Vue 2 and Vuetify 2 LTS HOT 1
- package-lock.json messed up since merge of #335 HOT 1
- Upgrade to Vue 3 HOT 3
- Upgrade to Vuetify 3 HOT 2
- Access to layer inside HoverTooltip HOT 4
- OL layer properties are no longer reactive HOT 5
- Document global app properties
- Transition to new ESLint configuration
- Use new code formatting approach since ESLint deprecated all formatting rules
- Do not assign to Vue.prototype in unit tests
- Clarify revert before "Add a custom module" in workshop
- PDOK WMS and WFS in broken in "projected" example HOT 1
- Remove axios dependency? HOT 5
- Use axios consequently for all HTTP requests in Wegue
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 wegue.