Unverified Commit 69620bdf authored by Hoi Sing Edison Wong's avatar Hoi Sing Edison Wong
Browse files

Issue #3254562 by hswong3i: Add drustack/Leaflet.SyncView Support

parent a8163b43
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -41,7 +41,7 @@ update your `composer.json` as below:
        "require": {
            "drupal/leaflet": "3.0.x-dev",
            "npm-asset/drustack--leaflet.resetview": "~1.1",
            "npm-asset/drustack--leaflet.syncview": "~1.0",
            "npm-asset/drustack--leaflet.syncview": "~1.1",
            "npm-asset/geoman-io--leaflet-geoman-free": "~2.11",
            "npm-asset/leaflet": "~1.7",
            "npm-asset/leaflet-fullscreen": "~1.0",
+10 −0
Original line number Diff line number Diff line
@@ -359,6 +359,16 @@ field.formatter.settings.leaflet_formatter_default:
        options:
          type: text
          label: 'Options'
    syncview:
      type: mapping
      label: 'Leaflet Sync View'
      mapping:
        control:
          type: boolean
          label: 'Control'
        options:
          type: text
          label: 'Options'
    path:
      type: text
      label: 'Path'
+7 −0
Original line number Diff line number Diff line
@@ -174,6 +174,13 @@
      ).addTo(self.lMap);
    }

    // Add Sync View Control, if requested.
    if (self.settings.syncview.control) {
      L.control.syncView(
        JSON.parse(self.settings.syncview.options)
      ).addTo(self.lMap);
    }

  };

  Drupal.Leaflet.prototype.initialise_layer_control = function(mapid) {
+17 −0
Original line number Diff line number Diff line
@@ -117,6 +117,8 @@ leaflet.locate:
      /libraries/leaflet.locatecontrol/dist/L.Control.Locate.min.css: { minified: true }
  js:
    /libraries/leaflet.locatecontrol/dist/L.Control.Locate.min.js: { minified: true }
  dependencies:
    - leaflet/leaflet

leaflet.resetview:
  remote: https://github.com/drustack/Leaflet.ResetView
@@ -131,3 +133,18 @@ leaflet.resetview:
    /libraries/drustack--leaflet.resetview/dist/L.Control.ResetView.min.js: { minified: true }
  dependencies:
    - leaflet/leaflet

leaflet.syncview:
  remote: https://github.com/drustack/Leaflet.SyncView
  license:
    name: Apache-2.0
    url: https://raw.githubusercontent.com/drustack/Leaflet.SyncView/master/LICENSE
    gpl-compatible: yes
  css:
    component:
      /libraries/drustack--leaflet.syncview/dist/L.Control.SyncView.min.css: { minified: true }
  js:
    /libraries/drustack--leaflet.syncview/dist/L.Control.SyncView.min.js: { minified: true }
  dependencies:
    - core/jquery
    - leaflet/leaflet
+10 −0
Original line number Diff line number Diff line
@@ -197,6 +197,16 @@ views.style.leaflet_map:
        options:
          type: text
          label: 'Options'
    syncview:
      type: mapping
      label: 'Leaflet Sync View'
      mapping:
        control:
          type: boolean
          label: 'Control'
        options:
          type: text
          label: 'Options'
    path:
      type: string
      label: 'Path'
Loading