-
-
Notifications
You must be signed in to change notification settings - Fork 214
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve MapLibre demo to show all available lines/points/polygons from all sources #536
Comments
@nyurik I would like to work on this. I am confused in two things.
|
The "inspector" mode is the answer to the first question too - something similar to mapbox-gl-inspect but for MapLibre (the same thing should exist in Maputnik I would think, or at least it should be ported if not). This way you don't really care what type of geometry each layer has - you just draw them all. |
Thank you @nyurik I shall look into mapbox-gl-inspect. Also I have opened a draft PR for other features. Please provide your feedback if any. |
- [ ] show lines and polygons - [ ] show all layers regardless of their name - [x] different color for each layer - [x] make left sidebar resizable - [x] add search box - closes #536
Thanks for working on this! Is there a Martin instance that we can use to link from the Readme to preview the feature? |
Seems this was closed by accident - debug.html still doesn't show polygons, and we need to figure out the "x-ray" mode so that it shows all content without knowing what that content is beforehand |
FYI this might be something that can be reused or be used as an inspiration https://twitter.com/j_igarashi/status/1663405008359129088 |
For display all layers in Martin withou knowing the geometry type before, Could this benefit from Future-proof source catalog .Like add the geometry type in metadata?
|
My understanding is that maplibre inspection mode should allow showing all data without having any Metadata. Same as what Maputnik does |
Hi @nyurik Have a lovely day. :D foreach(var source in sources){
// add circle layer
map.addLayer({
id: source.id + "_circle",
...
filter: ['==', '$type', 'Point'],
paint: {
"circle-color": stringToColour(source.id),
"circle-radius": 2
}
});
// add linestring layer
map.addLayer({
id: source.id + "_line",
type: "line",
....
filter: ['==', '$type', 'LineString'],
paint: {
'line-color': stringToColour(source.id),
}
});
// add polygon layer
...
} |
Try to resolve #536, but still it can't show the function source without comment... - [x] Show all layers with correct geometry type - [x] Inspect feature property - [x] Allow to scroll popup content with max-height and a vertical scroll bar - [x] Allow to stop the popup showing after click outside - [x] It's possible to select text when the popup it's fixed Maybe we should have an inspect toggle? --------- Co-authored-by: Yuri Astrakhan <YuriAstrakhan@gmail.com>
Current martin demo page shows a list of all available sources (by first calling the
/catalog
API), and allows the users to turn on/off each source individually. There are some limitations that need to be addressed:Requirements
Instructions for those who may want to help with this
rust install just
just run
tests/debug.html
file in your browser by copy/pasting the full path to itThe text was updated successfully, but these errors were encountered: