Problem
There is currently no way to set the zoom level in Leaflet maps that are created using Leaflet Views integration.

Current status
A patch has been submitted. Review is needed.

Original message
I can't find the option to select the zoom of the map.

Is this only for me or that option really is not available?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

joco_sp created an issue. See original summary.

GreenSkunk’s picture

Zoom options show in the options in a geofield display settings in the corresponding content type?
/admin/structure/types/manage/[CONTENT-TYPE]/display

joco_sp’s picture

I am using it in Views.
Format:Leaflet is not working for me, so I use Format:Leaflet map (old) and there is no option to select the zoom.

Carlos Miranda Levy’s picture

I can confirm (although I'm using 8.x-1.0-beta1) there is no zoom option in Views.
The Views auto-zooms to display all plotted points though.

MrPeanut’s picture

Title: Zoom » Add zoom settings to Views
PhilippVerpoort’s picture

Any updates on this?

benjamin.merkley’s picture

Im experiencing a similar issue

paul_canning’s picture

I am also using 'Leaflet (Old)' as the normal Leaflet format doesn't seem to work.

Can we please get zoom levels, and also the ability to add a default location when no pins are shown (in the case where exposed filters are used).

PhilippVerpoort’s picture

Issue summary: View changes
Status: Active » Needs review
FileSize
2.5 KB

I have created a patch which should provide this feature.

PhilippVerpoort’s picture

I am also providing a second patch that should provide the ability to set the centre of the map for Leaflet maps created with Views, as requested by @paul_canning in #8.

This patch is building up on the one in #9 (the diff has been created against that commit). This patch is a bit more complicated and less straight-forward than the one in #9, as I also had to make changes to the leaflet.drupal.js file. Furthermore, the text field that allows users to enter the centre of the map in the Views configuration page isn't very sophisticated, and I would suggest replacing it with some type of text field that is more suitable for geolocation data.

I suggest the maintainer proceeds with committing patch #9 to the repository (after it has been confirmed by others that it works). The patch in #10 should also work, and I encourage everyone to test it, but I suggest the maintainer takes a closer look at the changes before committing this one as well.

  • itamair committed d6ae047 on 8.x-1.x
    Better implementation of Custom Map positioning, with Center and Zoom (...
itamair’s picture

Last dev and 1.0-beta8 release fixed and further enhanced this ...

itamair’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.