Comments (7)
The advantage of putting it in a separate plugin is that it can be built and maintained separate from either esri-leaflet or this plugin. Then when we decide which one it belongs in we just include it in the build process so that the user only needs to worry about one plugin. I like the idea of 'micro' plugins as it keeps the core functionality of the original plugin cleaner.
from esri-leaflet-renderers.
That seems reasonable, I had intended to keep this plugin confined to the Drawing Info in the metadata but it does feel like a 'renderer' type of thing. I think it should be similar to the styles where it would only be applied if the user did not define a min/maxZoom.
from esri-leaflet-renderers.
i like the sound of that. but on the other hand, i could also just write a demo app in esri-leaflet that shows how to interrogate your own layer and set the properties dynamically.
any thoughts @patrickarlt?
from esri-leaflet-renderers.
The code is so minimal I'm in favor of leaving min/max scale in this plugin (allowing you to override on the layer options) and just having @jgravois do an example.
from esri-leaflet-renderers.
I'm closing this in favor of Esri/esri-leaflet#426 as the code is not as minimal as initially expected.
from esri-leaflet-renderers.
Hey guys, sorry for chiming in late here, but here's a few additional thoughts. If a user takes the time to set the renderer symbology for a FeatureLayer (most likely by using the Map Viewer) then they mostly likely took time to set the zoom levels too. There's definitely a solid usability relationship between the two and it's definitely frustrating when client apis don't respect those meta settings. I just went through this whole exercise on a recent project and ran into the zoom level limitation with esri-leaflet. Therefore, it definitely feels a little strange that this functionality 1) wouldn't be built into core as an optional setting (true by default), or 2) it wouldn't be built into this repo since symbols and zoom levels are so closely related. A whole plugin just to toggle layers on and off?
from esri-leaflet-renderers.
I think we are all talking around 2 different problems here.
- Automatically using min/max zoom from the service metadata for
FeatureLayers
this is what @kneemer and @jgravois have been discussing - Automatically using min/max zoom from the service metadata for
TileLayers
this is the problem that @alaframboise had (since Esri Leaflet only updated the dark gray basemap yesterday)
Building this into the base of the library seems problematic because it adds a lot of complexity, mostly because layer drawing is controlled based on min/max zoom and we have to check if its with range before drawing. Its another request and adds a decent amount of complexity and it means we have to delay drawing for another round trip.
Leaflet also doesn't support dynamically setting the min/max zoom after the fact. It only checks it at the time you add the layer to the map. So in addition to having to alter the drawing code we also have to use some of the internal methods to update the zoom range which seems a bit messy.
Maybe a better way around this is to wrap creating the proper options object from the metadata as a helper method for users.
// the getOptions comes from a plugin
L.esri.FeatureLayer.getOptions(url, function(error, options){
L.esri.featureLayer(url, options).addTo(map);
});
from esri-leaflet-renderers.
Related Issues (20)
- About the main file HOT 3
- add support for text symbols HOT 6
- setWhere callback is not called HOT 3
- featureLayer throws 'this.options.userDefinedStyle is not a function' intermittently HOT 7
- Unable to use plugin via AMD HOT 7
- Unable to build under node v7.7.4 HOT 1
- picture marker symbols in custom panes don't draw in drupal (and other CMSs) HOT 19
- Next release? HOT 3
- service symbology not honored when field names are lower-case HOT 7
- Default Marker show up after clustering with esri-leaflet-cluster HOT 1
- Support valueExpression property of renderer. HOT 2
- Make esri-leaflet et al peerDependencies HOT 4
- Cluster HOT 5
- Uncaught TypeError: Cannot read property 'options' of undefined HOT 1
- initHooks are not setted using import style HOT 3
- TypeError: Cannot read properties of undefined (reading 'addInitHook') HOT 10
- Hi When deploying a docker the package gives this error and does not render a map HOT 2
- Support for esri leaflet 3 HOT 8
- Rendering/Redrawing layers created from ArcGIS point features fails due to Uncaught TypeError HOT 3
- Is it possible to use the plug-in to generate an image from symbol JSON for use outside of map
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 esri-leaflet-renderers.