Open AmeliaBR opened 5 years ago
Open ended is good, right? That's progressive enhancement's goal, after all. But, I agree with your approach of taking the least common denominator. I believe this was central to the goal of Leaflet itself, and it's why I built my polyfill with it in the first place. Would be awesome if @IvanSanchez or @mourner could help us visualize a decent API for the eventual (proposed) <map>
and <layer>
DOM.
Capabilities review for Leaflet is as follows. For several items, the actual Leaflet.js library does not support the capability on it's own, but there some popularopen source/plugins that can be used to perform that capability that are built specifically for Leaflet. What level of support do you think this constitutes as? @AmeliaBR
Full support.
Supported, option to use WMS services as a tile layer, or a single large image.
Supported, this is the default behavior for Leaflet as it does not provide its own tiles.
No support, as Leaflet is a JS library.
Full support for multiple markers.
Full support for both Polylines and Polygon vector layers.
Full support, markers or other vector featuers can have popups bound to them. These popups can contain custom HTML content, include hyperlinks.
Full support. Since map tiles do not come with the library, you need to pass this in as an option.
Full support, this is the default way to select a map view for Leaflet.
No geocoders are within the actual library, but there are several plugins that offer this functionality.
Leaflet comes with three projections out of the box, Equirectangular, Elliptical Mercator and Spherical Mercator (AKA Web Mercator). Web Mercator is the default projection. The Proj4Leaflet library allows for other projections to be used.
Not supported at this moment, you can work around this by reinitializing the map in a different projection.
Supported with limitations? You could create your own control to do this, but it doesn't come as part of the default viewer.
Supported, buttons are keyboard accessible (but with wonky focus styles), you can also press the + and - keys to zoom when the map is focused, but again, no focus styles.
Supported, pannable with arrow keys as well.
Supported.
Supported.
This is going to depend on your tiles, but supported with OSM.
Supported.
Supported, but depends on your tiles.
Full support, map features can be styled using syntax similar to SVG path attributes. Map markers can have custom icons.
Supported, you can edit some basic things such as positioning with JS, or you can customize the controls further with CSS.
Supported, you can hide controls as part of the initial configuration object.
Sorry, just bumping this to get your eyes on this again! @AmeliaBR (and @prushforth if you'd like to weigh in), any opinions on what level of support Leaflet should be categorized as having if a capability is not supported the core Leaflet.js library, but there are open source plugins that provide support for that capability?
I'm in the full support camp YMMV!
I'd consider that a "support, with limitations" if you need to install something extra. Either way, make sure the notes clearly state that a plugin is required.
Save the location or export to other application
Supported with limitations? You could create your own control to do this, but it doesn't come as part of the default viewer.
This is an end-user use case, so I wouldn't consider it supported unless it is supported by default.
This issue is for discussion of the reference tool "Leaflet.js API".
overview and docs
Placeholder for discussing issues about Leaflet as an example in the review. One issue with leaflet is that it is very open-ended. I'm planning to focus on the simplest examples / capabilities that you get out of the box.