Comments (13)
We can add support to allow radius defined based on real-world distances (e.g. 10km radius).
Though I have to deprioritize this for now, at least after the full geoJson geometry type support.
but PR is always welcomed : )
from deck.gl.
@gnavvy ScatterPlotOverlay should redraw if the radius option changes, right? Can't seem to get that to work.
from deck.gl.
depends. the default radius will scale with the zoom (derived from a ∆latitude) but for now if you pass in your own radius, it will override the default one.
https://github.com/uber/deck.gl/blob/master/src/layers/scatterplot-layer/scatterplot-layer.js#L133
from deck.gl.
@gnavvy Default radius doesn't seem to be scaling right.
from deck.gl.
could you elaborate on what is the problem with the scaling? the radius was defined to be approximately the same with the street size (bottom image) but became larger (top image) than expected when zoom in?
from deck.gl.
@gnavvy Looks fine on lower zoom levels, but on higher zoom levels the dots become extremely large and eventually obscure the entire viewport.
This is with a ScatterplotLayer that has no radius parameter given, so being calculated here: https://github.com/uber/deck.gl/blob/master/src/layers/scatterplot-layer/scatterplot-layer.js#L138-L144
Here's what I'm trying to achieve:
from deck.gl.
I see, so basically a maximum radius to prevent the points from getting too large.
will add the support together with #54
from deck.gl.
we might have to add more thorough solutions to allow radius:
- with constant screen size;
- with constant geo-distance;
- scales with zoom;
- scales with zoom + with max screen size;
for now, specifying both global radius at layer level and radius at per item level will lead to radius with constant screen size.
from deck.gl.
Specifying both global radius at layer level and radius at per item level used to give a radius with a constant screen size, but after I updated to the newest version, this doesn't seem to be working.
from deck.gl.
I ended up using the code outlined here to normalize the radius if anyone else is needing this: http://stackoverflow.com/questions/30703212/how-to-convert-radius-in-metres-to-pixels-in-mapbox-leaflet
from deck.gl.
@Vednus This should not be needed.
I think there is a difference between Scatterplot and Scatterplot64. The 32 bit version should behave correctly (i.e the radius should be in item radius * layerRadius
meters, the latter hasn't been updated completely.
Can you confirm which layer you are using?
We've gotten some feedback that the docs need improving in this regard as well (scatterplot radius handling and interaction between props and accessor etc).
@manassra @shaojingli
from deck.gl.
I'm using the 32 bit version via import { ScatterplotLayer } from 'deck.gl'
so I guess it's not behaving correctly...
from deck.gl.
Tracked in #264
from deck.gl.
Related Issues (20)
- No way to get the image data coordinates, project gives the wrong ones HOT 1
- Sometimes width of TripsLayer is not correct HOT 1
- [Bug] 3D Occlusion Non-functional in @deck.gl/mapbox interleaved rendering HOT 3
- [Bug] CARTO: wrong clientId
- [Bug] Webpack bundle error HOT 1
- [Bug] Broken website examples in `9.0.0-beta.10` HOT 6
- Deprecate MapboxLayer in favor of MapboxOverlay HOT 4
- [Bug] CARTO RasterTileLayer not working in Firefox HOT 1
- Add mapbox and maplibre get-started scripting examples
- [Feat] Support Reading MVTiles from S3 buckets HOT 9
- Tracker: Restoring unit tests HOT 1
- [Bug] running yarn test reports a missing dependency HOT 3
- [Bug] TypeError: Cannot read properties of undefined (reading 'extend') in pydeck Jupyter Widget HOT 1
- [maplibre] checkerboard rendering regression when `interleaved: true` HOT 13
- [bug] H3HexagonLayer in the Mapbox example renders random pink hexagons HOT 1
- [Bug] Building pydeck fails during linking to jupyterlab
- [Bug] CARTO: boundaryQuerySource ignores `matchingColumn` prop
- [Feat] PMTile Support HOT 2
- [Feat] For map/layer onClick handle to return 3D coordinates of the touched surface, not just the 2D coordinates of the "ground behind the object" HOT 2
- [Bug] Info format is hardcoded to default value causing `getFeatureInfoText` to fail
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 deck.gl.