Comments (15)
You can remove the control this way :
map.zoomControl.remove()
from vue2leaflet.
Done its on master branch now.
from vue2leaflet.
Closing as no comments for 3 weeks.
Please reopen this issue if it not solved yet.
from vue2leaflet.
If I understand you correctly,
Refer to #46
You can get the map object from there and use that to set whatever options you need.
If the answer not correct, please give an example of what you are trying to achieve.
from vue2leaflet.
I'm trying to override the default widget options in http://leafletjs.com/reference-1.0.3.html#control and http://leafletjs.com/reference-1.0.3.html#control-zoom, like 'position': 'top-right', for example.
from vue2leaflet.
Would the following help?
// inside mounted(), find the map object
// refer to https://github.com/KoRiGaN/Vue2Leaflet/issues/46
// do the following...
...
map.zoomControl.remove()
L.control.zoom({ position:'topright' }).addTo(map);
from vue2leaflet.
Yes, it helps indeed! I guess it's reasonable to do so, but in the future those widget options should be customizable using :props, don't you think?
Thank you for your help.
from vue2leaflet.
You may be right, but this Vue library is still pretty new to me so I can't make a good opinion on this.
The author of this library may be in a better position to explain why things are done in a certain way, but so far I do see this library being improved actively.
from vue2leaflet.
Hi @fergardi,
Zoom and Scale Controls in Leaflet are not implemented yet as I didn't have time to do it.
You will be able to modified Attributions via a prop on each TileLayer in the v0.0.50 thanks to @EyMaddis pull request.
Layers Control only works for WMSLayers at the moment thanks to @nikos pull request. More work will be requiered to make it a generic layer control.
Mickaël
from vue2leaflet.
It's nice to know. Thanks for your work!
from vue2leaflet.
So, is it not possible to disactivate zoomControl?
from vue2leaflet.
YEAH, perfect!
from vue2leaflet.
Hi @fergardi, @ais-one, @ItsLhoudini,
Controls are now implemented in v1.0.1.
Let me know if it solves your issue.
Micka
from vue2leaflet.
ok, time to update package...
from vue2leaflet.
Thanks for the notice, I have updated my code base (vue2-leaflet-tracksymbol v1.0.11) to work on Vue2Leaflet v1.0.1 in my develop branch, seems to be working fine.
https://github.com/ais-one/vue2-leaflet-tracksymbol/tree/develop
Will push it to master once further testing is done.
from vue2leaflet.
Related Issues (20)
- Cannot add alt-text to l-marker icon HOT 2
- Leaflet GeoTiff plugin HOT 2
- The judgment statement may need to be corrected HOT 1
- Abnormal re-render of L-map when an unrelated data property changes HOT 1
- Add scale option for nautical miles HOT 2
- Suggestion for icon rotate / rotation / rotating - easy solution HOT 2
- Cannot read properties of undefined (reading '_leaflet_pos') HOT 1
- Leaflet in Dashboard Widget ( with vue-grid-layout) doesn't center
- Performance problem with big amounts of LCircleMarker HOT 1
- A trouble using Vue2Leaflet with perfect-scrollbar HOT 1
- popups broke HOT 3
- L.vectorGrid.protobuf plugin HOT 2
- coords are not unique HOT 1
- Not unique coords HOT 1
- Roadmap to support Leaflet 1.8.0 HOT 7
- Can you fix the document error 😥 HOT 1
- token prop merged out HOT 3
- lineCap is NOT working in Vue2-leaflet
- Map does not render logically when moving with one finger on uniapp
- Converting mapObject to leafletObject, as it is not working
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 vue2leaflet.