Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Widget options #41

Closed
fergardi opened this issue May 18, 2017 · 15 comments
Closed

Widget options #41

fergardi opened this issue May 18, 2017 · 15 comments

Comments

@fergardi
Copy link

How to set original Leaflet widget zoom, navigation, scale options like position, attributes, etc?

@ais-one
Copy link

ais-one commented May 23, 2017

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.

@fergardi
Copy link
Author

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.

@ais-one
Copy link

ais-one commented May 24, 2017

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);

@fergardi
Copy link
Author

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.

@ais-one
Copy link

ais-one commented May 24, 2017

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.

@KoRiGaN
Copy link
Collaborator

KoRiGaN commented May 24, 2017

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

@KoRiGaN KoRiGaN reopened this May 24, 2017
@fergardi
Copy link
Author

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

@wondergitluda
Copy link

wondergitluda commented Jul 31, 2017

So, is it not possible to disactivate zoomControl?

@3RedM0
Copy link

3RedM0 commented Jul 31, 2017

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

@wondergitluda
Copy link

YEAH, perfect!

@KoRiGaN
Copy link
Collaborator

KoRiGaN commented Mar 27, 2018

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

Controls are now implemented in v1.0.1.

Let me know if it solves your issue.

Micka

@ais-one
Copy link

ais-one commented Mar 27, 2018

ok, time to update package...

@ais-one
Copy link

ais-one commented Mar 28, 2018

@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.

@ais-one
Copy link

ais-one commented Mar 29, 2018

@KoRiGaN

Done its on master branch now.

@KoRiGaN
Copy link
Collaborator

KoRiGaN commented Apr 17, 2018

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

@KoRiGaN KoRiGaN closed this as completed Apr 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants