@osimatic/helpers-js 1.4.11 → 1.4.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG CHANGED
@@ -78,4 +78,5 @@ HTTPRequest -> HTTPClient
78
78
  PostalAddress.setAutocomplete(input, onChange(formatted_address)) -> PostalAddress.setAutocomplete(input, onChange(place));
79
79
 
80
80
  1.4.0
81
- new OpenStreetMap(id) -> new OpenStreetMap(element)
81
+ new OpenStreetMap(id) -> new OpenStreetMap(element)
82
+ OpenStreetMap.centerOnFrance -> OpenStreetMap.centerMapOnCountry('FR')
@@ -22,11 +22,6 @@ class OpenStreetMap {
22
22
  this.locations = [];
23
23
 
24
24
  this.map = OpenStreetMap.createMap(mapContainer, options);
25
- if (null === this.map) {
26
- return;
27
- }
28
-
29
- this.centerOnFrance();
30
25
  }
31
26
 
32
27
  static createMap(mapContainer, options={}) {
@@ -45,7 +40,8 @@ class OpenStreetMap {
45
40
  attribution: '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>'
46
41
  }).addTo(map);
47
42
 
48
- OpenStreetMap.centerOnFrance(map);
43
+ const country = options['country'] || 'FR';
44
+ OpenStreetMap.centerMapOnCountry(map, country);
49
45
 
50
46
  return map;
51
47
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@osimatic/helpers-js",
3
- "version": "1.4.11",
3
+ "version": "1.4.13",
4
4
  "main": "main.js",
5
5
  "scripts": {
6
6
  "test": "echo \"Error: no test specified\" && exit 1"