Comments (4)
Hi.
It is possible that i'm using topojson a bit weirdly (it's been a while and i do not remember clearly).
However, the demos use Leaflet default projection which expects 4326 coords.
The example you are giving use d3.geo.albersUsa
projection so bad results can be expected when using Leaflet default projection.
Can you give me a topojson sample (using 4326 coords) so that i can have a look?
from leaflet.pixioverlay.
thanks for this fast answer
I am not sure the json i sent you is on Albers, I think is transforming to Albers from a spherical (geographical) coordinates, that is 4326... but I have never been good on projections
link
In any case here, on the EU comission official webpage can download different Topojson polygonal layers at different projections, including 4326. I cannot send here any example JSON, please download from the site.
I send also a screenshot of my result with one of these json. Of course I had to change a few things on code to generate it, but with this code and your french topojson it works. So, should work for others topojsons...
I think the plugin has a great potential, dreaming on creating color transitions on polygons on changing various parameters... any help appreciated
I suggest to add as base layer a grey map (see below), because maybe generated (weird) polygons are not very visible.
var grayLayer =L.tileLayer('https://{s}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}{r}.png', {
attribution: '© <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> © <a href="https://carto.com/attributions">CARTO</a>',
subdomains: 'abcd',
maxZoom: 19
}).addTo(map);
from leaflet.pixioverlay.
I think you are right for the coordinate system of d3 demo.
I have added a basic demo to display the US states:
https://manubb.github.io/Leaflet.PixiOverlay/simple-topojson.html
The sources are in the doc directory. Hope this will help you.
from leaflet.pixioverlay.
This is great! thanks a lot
from leaflet.pixioverlay.
Related Issues (20)
- Moving markers HOT 1
- collision detection with variable size markers - keep sizes constant HOT 2
- Export map with pixi overlay HOT 3
- Render stage to a texture
- Remove and add a new layer
- BUG: Library doesn't work with latest version of leaflet. HOT 4
- WebGL: CONTEXT_LOST error HOT 1
- Stop propagation HOT 1
- Change the order and style of multiple pixi overlays after adding to the map
- Add support for PixiJS@7 HOT 6
- Add a Geojson in the map HOT 3
- What is included in the example.min.js at many-markers example? HOT 1
- There is way to add a interactive polygon and a marker in the same PIXI Conteiner? HOT 5
- examples HOT 4
- Using Vue3 HOT 1
- PIXI v7 events HOT 1
- Help with custom coordinates HOT 8
- Resolved, texture image not loading HOT 1
- Error after updating the Pixi version HOT 3
- Adapting Pixi to Openlayers
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 leaflet.pixioverlay.