Code Monkey home page Code Monkey logo

Comments (15)

3RedM0 avatar 3RedM0 commented on August 26, 2024 1

You can remove the control this way :
map.zoomControl.remove()

from vue2leaflet.

ais-one avatar ais-one commented on August 26, 2024 1

@KoRiGaN

Done its on master branch now.

from vue2leaflet.

KoRiGaN avatar KoRiGaN commented on August 26, 2024 1

Closing as no comments for 3 weeks.
Please reopen this issue if it not solved yet.

from vue2leaflet.

ais-one avatar ais-one commented on August 26, 2024

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.

fergardi avatar fergardi commented on August 26, 2024

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.

ais-one avatar ais-one commented on August 26, 2024

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.

fergardi avatar fergardi commented on August 26, 2024

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.

ais-one avatar ais-one commented on August 26, 2024

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.

KoRiGaN avatar KoRiGaN commented on August 26, 2024

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.

fergardi avatar fergardi commented on August 26, 2024

It's nice to know. Thanks for your work!

from vue2leaflet.

ItsLhoudini avatar ItsLhoudini commented on August 26, 2024

So, is it not possible to disactivate zoomControl?

from vue2leaflet.

ItsLhoudini avatar ItsLhoudini commented on August 26, 2024

YEAH, perfect!

from vue2leaflet.

KoRiGaN avatar KoRiGaN commented on August 26, 2024

Hi @fergardi, @ais-one, @ItsLhoudini,

Controls are now implemented in v1.0.1.

Let me know if it solves your issue.

Micka

from vue2leaflet.

ais-one avatar ais-one commented on August 26, 2024

ok, time to update package...

from vue2leaflet.

ais-one avatar ais-one commented on August 26, 2024

@KoRiGaN

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.