Change the marker options iconSize and iconAnchor to snake case

This commit is contained in:
Emanuel Mutschlechner
2020-01-07 23:38:33 +01:00
parent 49f829643a
commit 195c8b1218
5 changed files with 11 additions and 7 deletions

View File

@@ -2,6 +2,10 @@
All notable changes will be documented in this file.
### 1.2.2 - 2020-02-06
- Change the marker options iconSize and iconAnchor to snake case
### 1.2.1 - 2020-01-06
- Prevent double initialization

View File

@@ -169,8 +169,8 @@ Additionally you may also specify the icon image size and anchor in pixels. The
'lng' => '11.555220',
'url' => 'https://gonoware.com',
'icon' => 'https://developers.google.com/maps/documentation/javascript/examples/full/images/beachflag.png',
'iconSize' => [20, 32],
'iconAnchor' => [0, 32],
'icon_size' => [20, 32],
'icon_anchor' => [0, 32],
],
],
])

2
public/js/index.js vendored

File diff suppressed because one or more lines are too long

View File

@@ -1,4 +1,4 @@
{
"/js/index.js": "/js/index.js?id=2e139c49390af2c9b185",
"/js/index.js": "/js/index.js?id=1e6f34e45ce1f8e9666f",
"/css/index.css": "/css/index.css?id=81569dd7736e102f4342"
}

View File

@@ -24,7 +24,7 @@ const parseMarkers = element => {
const lat = parseNumberFloat(marker.lat);
const lng = parseNumberFloat(marker.lng);
const {title, url, popup, icon, iconSize, iconAnchor} = marker;
const {title, url, popup, icon, icon_size, icon_anchor} = marker;
return {
title,
@@ -33,8 +33,8 @@ const parseMarkers = element => {
url,
popup,
icon,
iconSize,
iconAnchor,
iconSize: icon_size || marker.iconSize,
iconAnchor: icon_anchor || marker.iconAnchor,
};
});
};