Comments (1)
Umgesetzt in #17.
Das Styling der Zonen ist konfigurierbar. Selektierte Zonen können anders eingefärbt werden als nicht selektierte. Beispiel: https://trafimage-maps.netlify.com/#section-casa
Wir verbessern aktuell die Layer-Doku. Weil diese die neuen Parameter noch nicht enthält, hier eine kurz-Doku in Textform:
Beim Aufruf des Layers kann mit dem Attribut zoneStyle
der globale Style der Zonen definiert werden.
const zoneLayer = new ZoneLayer({
token: '...',
zoneStyle: {
stroke: { width: 0 },
},
});
Per Default wird folgender Style verwendet:
{
fill: {
color: 'rgb(255, 200, 25)',
},
stroke: {
width: 2,
color: 'black',
},
text: {
font: '12px Arial',
color: 'black',
},
};
Mit der neuen zoneStyleFunction
kann das Styling der Zonen dynamisch geändert werden:
const zoneLayer = new ZoneLayer({
token: '...',
zoneStyleFunction: (zoneProps, isSelected) => {
return {
fill: {
color: isSelected ? 'red' : 'rgb(255, 200, 25)',
},
};
},
});
Was sagt Ihr zur API? Wenn Ihr Änderungswünsche habt, dann teilt uns diese gern mit.
from trafimage-maps.
Related Issues (9)
- Language of Maps HOT 1
- Problem with Platforms with local_ref with ";" HOT 1
- Route Bern - Zürich HB kann nicht angezeigt werden wegen "Bahn-2000-Strecke" HOT 3
- ZoneLayer: Zone & Partner auslesen beim Click-Callback HOT 1
- Karte neu laden, wenn die Route ändert HOT 1
- Keine Ortsbezeichnung je nach Zoomstufe
- Action Required: Fix Renovate Configuration
- The slider on the zoom in/out bar disappears when map height is small HOT 1
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 trafimage-maps.