Comments (3)
Could you provide more info. An example jsfiddle or plunk?
from leaflet-control-orderlayers.
I would like to add a few geojson layers and OSM buildings (with geojson file prepered by me) orderlayers control.
code:
var test = {
"type": "FeatureCollection",
"crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:OGC:1.3:CRS84" } },
"features": [
{ "type": "Feature", "properties": { "id": 1 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 19.372517706874817, 51.870462293195203 ], [ 19.383449140566622, 51.875994346866371 ], [ 19.383449140566622, 51.875994346866371 ], [ 19.393753360849885, 51.874002885944066 ], [ 19.393753360849885, 51.874002885944066 ], [ 19.40629762902082, 51.870849559104272 ], [ 19.401907135160997, 51.852035647775509 ], [ 19.37153208580424, 51.855743717478589 ], [ 19.365259951718777, 51.862992941183535 ], [ 19.372517706874817, 51.870462293195203 ] ] ] } },
{ "type": "Feature", "properties": { "id": 3 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 19.434791038151932, 51.868249281169724 ], [ 19.430042136630082, 51.848659378281077 ], [ 19.414899412909456, 51.850098474938363 ], [ 19.414451403331928, 51.865261542203768 ], [ 19.434791038151932, 51.868249281169724 ] ] ] } }
]
};
var myStyle = {
"color": "#ff7800",
"weight": 5,
"opacity": 0.65
};
var json = new L.geoJson(test, {style: myStyle});
var osmb = new OSMBuildings(map).set(geoJSON).style({wallColor:'#815f33', roofColor:'#9f6a39'});
L.control.orderlayers(baseLayers, {"ZGR_hybryda": ZH, "Budynki 3D": osmb, "json": json},{collapsed: false, order: 'qgis', title: 'Warstwy'}).addTo(map);
L.control.layers(baseLayers, {"ZGR_hybryda": ZH, "Budynki 3D": osmb, "json": json, },{collapsed: false, opacity: true}).addTo(map);
from leaflet-control-orderlayers.
I have the same problem with GeoJson that pawaelus. Can you tell me if you have solved the issue in the pluggin or which solution is used to solved it.
from leaflet-control-orderlayers.
Related Issues (9)
- TypeError: obj.layer.options is undefined leaflet.control.orderlayers.js:100 HOT 1
- featureGroup layers not working in Leaflet 1.0.0-beta.2 ? HOT 3
- colliding z-index for bottom and top layers
- When I use lealfet-1.2, it does work well? HOT 1
- Demo available in HTTPS?
- Layers order at start HOT 2
- Can't add a layer group to the layer control HOT 1
- Demo page broken HOT 1
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-control-orderlayers.