From 47498464edc9ae00a951972b5122dc4d94286753 Mon Sep 17 00:00:00 2001
From: florenttorregrosa <florenttorregrosa@2388214.no-reply.drupal.org>
Date: Sun, 4 Jun 2017 19:27:59 +0200
Subject: [PATCH] Issue #2883700 by Grimreaper: Fix config schema

---
 config/schema/leaflet.schema.yml                   | 80 ++++++++++++++++++++++
 .../config/schema/leaflet_views.style.schema.yml   | 14 ++++
 2 files changed, 94 insertions(+)
 create mode 100644 config/schema/leaflet.schema.yml

diff --git a/config/schema/leaflet.schema.yml b/config/schema/leaflet.schema.yml
new file mode 100644
index 0000000..aebf402
--- /dev/null
+++ b/config/schema/leaflet.schema.yml
@@ -0,0 +1,80 @@
+# Schema for the configuration files of the Leaflet module.
+
+field.formatter.settings.leaflet_formatter_default:
+  type: mapping
+  label: 'Leaflet format settings'
+  mapping:
+    leaflet_map:
+      type: string
+      label: 'Leaflet map'
+    height:
+      type: integer
+      label: 'Map height'
+    zoom:
+      type: integer
+      label: 'Zoom'
+    minPossibleZoom:
+      type: integer
+      label: 'Min possible zoom'
+    maxPossibleZoom:
+      type: integer
+      label: 'Max possible zoom'
+    minZoom:
+      type: integer
+      label: 'Min zoom'
+    maxZoom:
+      type: integer
+      label: 'Max zoom'
+    popup:
+      type: boolean
+      label: 'Popup'
+    icon:
+      type: mapping
+      label: 'Map icon'
+      mapping:
+        icon_url:
+          type: string
+          label: 'Icon URL'
+        shadow_url:
+          type: string
+          label: 'Shadow URL'
+        icon_size:
+          type: mapping
+          label: 'Icon size'
+          mapping:
+            x:
+              type: integer
+              label: 'Width'
+            y:
+              type: integer
+              label: 'Height'
+        icon_anchor:
+          type: mapping
+          label: 'Icon anchor'
+          mapping:
+            x:
+              type: integer
+              label: 'Width'
+            y:
+              type: integer
+              label: 'Height'
+        shadow_anchor:
+          type: mapping
+          label: 'Shadow anchor'
+          mapping:
+            x:
+              type: integer
+              label: 'Width'
+            y:
+              type: integer
+              label: 'Height'
+        popup_anchor:
+          type: mapping
+          label: 'Popup anchor'
+          mapping:
+            x:
+              type: integer
+              label: 'Width'
+            y:
+              type: integer
+              label: 'Height'
diff --git a/leaflet_views/config/schema/leaflet_views.style.schema.yml b/leaflet_views/config/schema/leaflet_views.style.schema.yml
index 10a10c0..e0c9fb2 100644
--- a/leaflet_views/config/schema/leaflet_views.style.schema.yml
+++ b/leaflet_views/config/schema/leaflet_views.style.schema.yml
@@ -13,6 +13,9 @@ views.style.leafet_map:
     description_field:
       type: string
       label: 'Description field'
+    view_mode:
+      type: string
+      label: 'View mode'
     map:
       type: string
       label: 'Map'
@@ -69,3 +72,14 @@ views.style.leafet_map:
             y:
               type: string
               label: 'Y'
+
+views.style.leafet:
+  type: views_style
+  label: 'Leaflet map'
+  mapping:
+    map:
+      type: string
+      label: 'Map'
+    height:
+      type: string
+      label: 'Map height'
-- 
2.1.4

