After updating from 1.x-dev#f751350 (January 2019) to recent 1.x-dev#1f2c5d7 the field formatter does not center on the location marker (in our case a single marker), as it did before but defaults on somewhere in the atlantic ocean on the coast of West Africa. The marker is set correctly on the map though.

The Views Formatter still centers.

CommentFileSizeAuthor
#2 Screen Shot 2019-04-01 at 6.18.04 PM.jpg206.27 KBitamair

Comments

anruether created an issue. See original summary.

itamair’s picture

StatusFileSize
new206.27 KB

@anruether strange ... I tried to reproduce your described use case, as in mine everything looks ok with the Leaflet Formatter output and map center.
So ... Geofield as single field. Still everything normal and ok (@see attached screenshot), with actual 1.x-dev#1f2c5d7.

You should inspect better your use case, and probably give more details.
Any console js error? Any constrain in the map center?
What kind of Geo feature are you managing? Just POINT or is it Geometry Collection?

itamair’s picture

Status: Active » Postponed (maintainer needs more info)
anruether’s picture

Status: Postponed (maintainer needs more info) » Closed (works as designed)

Sorry, this is indeed not a bug! I (re-)introduced the JS from #2995740: Add option for fixed popups in our project. This can be solved by deleting the code again obviously (bad for our fixed popup on the Views Map) or, oddly, by activating Popup Infowindow in the Field Formatter options. The linked code seems to trigger a JS error which is omited by activating the Popup Infowindow:

TypeError: lFeature._popup is undefined[Weitere Informationen] leafletpopup.js:34:5
    <anonym> domain.tld/themes/contrib/enzian/assets/js/leafletpopup.js?ppath0:34
    jQuery 7
    add_features domain.tld/modules/contrib/leaflet/leaflet.drupal.js?v=8.6.13:226
    attach domain.tld/modules/contrib/leaflet/leaflet.drupal.js?v=8.6.13:30
    jQuery 2
    attach domain.tld/modules/contrib/leaflet/leaflet.drupal.js?v=8.6.13:22
    each jQuery
    attach domain.tld/modules/contrib/leaflet/leaflet.drupal.js?v=8.6.13:21
    attachBehaviors domain.tld/core/misc/drupal.js?v=8.6.13:25
    forEach self-hosted:262
    attachBehaviors domain.tld/core/misc/drupal.js?v=8.6.13:22
    <anonym> domain.tld/core/misc/drupal.init.js?v=8.6.13:16
    t domain.tld/core/assets/vendor/domready/ready.min.js?v=1.0.8:4