-
Notifications
You must be signed in to change notification settings - Fork 12
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
Tool: Leaflet.js #29
Comments
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) |
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 4.3.1.1 Generate a default map for a given areaFull support. 4.3.1.2 Display a map using a single custom image as a map layerSupported, option to use WMS services as a tile layer, or a single large image. 4.3.1.3 Display a map using tile data from an author-specified web map serviceSupported, this is the default behavior for Leaflet as it does not provide its own tiles. 4.3.1.4 Display a basic map without JavaScriptNo support, as Leaflet is a JS library. 4.3.2.1 Show pinpoint locations or custom markers on the mapFull support for multiple markers. 4.3.2.2 Draw polygons or polylines as stylable, interactive vector graphics (separate from the image tiles)Full support for both Polylines and Polygon vector layers. 4.3.2.3 Support hyperlinks from markers or vector featuresFull support, markers or other vector featuers can have popups bound to them. These popups can contain custom HTML content, include hyperlinks. 4.3.2.4 Display map data attribution and linksFull support. Since map tiles do not come with the library, you need to pass this in as an option. 4.3.3.1 Select map view from latitude and longitude pointFull support, this is the default way to select a map view for Leaflet. 4.3.3.2 Select map view from street address or place nameNo geocoders are within the actual library, but there are several plugins that offer this functionality. 4.3.3.3 Display map tiles defined in various common coordinate systemsLeaflet 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. 4.3.3.4 Reproject map tile data into a new projection or globe viewNot supported at this moment, you can work around this by reinitializing the map in a different projection. 4.3.3.5 Save the location or export to other applicationSupported with limitations? You could create your own control to do this, but it doesn't come as part of the default viewer. 4.3.4.1 Zoom the map independently from the rest of the pageSupported, 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. 4.3.4.2 Pan the map displaySupported, pannable with arrow keys as well. 4.3.4.3 Load additional map tiles when they pan into viewSupported. 4.3.4.4 Wrap/duplicate data tiles when panning around the globeSupported. 4.3.4.5 Maintain reasonable scale of labels and lines when zoomingThis is going to depend on your tiles, but supported with OSM. 4.3.4.6 Dynamically load different resolution map tile on zoomSupported. 4.3.4.7 Hide or show (and maybe dynamically load) vector features and labels on zoomSupported, but depends on your tiles. 4.3.5.1 Apply custom styling to map markers and vector featuresFull support, map features can be styled using syntax similar to SVG path attributes. Map markers can have custom icons. 4.3.5.2 Apply custom styling to map controlsSupported, you can edit some basic things such as positioning with JS, or you can customize the controls further with CSS. 4.3.5.3 Toggle whether default controls are displayedSupported, 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. |
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.
The text was updated successfully, but these errors were encountered: