Comments (4)
Hi! You can do it in your frontend as well (Mapbox GL JS). Call your id (int or string) on the function source and then:
map.addSource('counties', {
"type": "vector",
"url" || "tiles": "your url / tiles",
"promoteId": "your id"
});
from martin.
@AdriSolid For now I do it with custom function and ST_AsMVT
(https://postgis.net/docs/ST_AsMVT.html) takes last param as feature_id_name, but your advice is very helpful too. Thanks!
Will leave doc link here for the community: https://docs.mapbox.com/mapbox-gl-js/style-spec/sources/#vector-promoteId
from martin.
great idea @AdriSolid but that is a very Mapbox GL specific feature. I do, think this feature is very valuable to have in API itself that way it's available agnostic of which client is being used to render the tiles.
from martin.
This is partially already implemented, and will be cleaned up and fixed in #380
from martin.
Related Issues (20)
- Run Martin on subpath with Traefik proxy HOT 1
- Support docker compose plugin to justfile HOT 4
- Some `mbtiles` tool operations produce db or disk/machine out of space errors HOT 3
- Migrate MacOS CI to use new MacOS M1 runners
- Implement PMTiles S3 bucket support with authentication HOT 2
- Martin v0.11.6 much faster than v0.12.0 and 0.13.0?? HOT 3
- Implement `--preferred-encoding (gzip|brotli)` configuration
- Add `--base-path` CLI option to override the URL path in the tilejson HOT 6
- Website breaks when you click on Jan 1st in the demo
- Add a Tile Preview HOT 1
- How to handle dynamic sources? HOT 2
- For `--auto-bounds quick`, use `ST_EstimatedExtent` instead of `ST_Extent` for quicker results HOT 3
- `Event not found` when starting martin HOT 3
- Add file extension to individual tile URL
- Output valid TileJSON for PostgreSQL Function Sources HOT 2
- Failed local installation due to mismatched types compilation error HOT 1
- What happens when a new materialized view / table added to the database? HOT 1
- db error: ERROR: column ix.indnkeyatts does not exist HOT 6
- Detect old postgresql versions and warn user HOT 2
- version `GLIBC_2.33' not found (required by mbtiles) HOT 6
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 martin.