@premiate/strapi-plugin-maplibre-field 1.0.6 → 1.0.7
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/README.md +22 -27
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -8,7 +8,7 @@ A [Strapi](https://strapi.io/) plugin that provides a [MapLibre](https://www.map
|
|
|
8
8
|
|
|
9
9
|

|
|
10
10
|
|
|
11
|
-
You can use the search box to pinpoint the location you are looking for. Alternatively, you can double-click anywhere on the map, which will put a marker at the exact point and set longitude and latitude. Any Point Of Interest on the base map or
|
|
11
|
+
You can use the search box to pinpoint the location you are looking for. Alternatively, you can double-click anywhere on the map, which will put a marker at the exact point and set longitude and latitude. Any Point Of Interest on the base map or while setting the address at the closest geolocated point on OpenStreetMap.
|
|
12
12
|
|
|
13
13
|
The longitude and latitude of the geolocated point are displayed in the readonly fields underneath the map. The address matches the closest geolocated point.
|
|
14
14
|
|
|
@@ -125,14 +125,6 @@ interface MapStyle {
|
|
|
125
125
|
|
|
126
126
|
The plugin uses **MapLibre GL JS** for rendering, which supports any style that follows the [MapLibre Style Specification](https://maplibre.org/maplibre-style-spec/).
|
|
127
127
|
|
|
128
|
-
#### Default Configuration
|
|
129
|
-
|
|
130
|
-
By default, the plugin includes multiple map styles:
|
|
131
|
-
|
|
132
|
-
- **Satellite** view using MapTiler satellite imagery
|
|
133
|
-
- **OpenStreetMap** view with vector tiles
|
|
134
|
-
- Users can switch between styles using the basemap control in the map interface
|
|
135
|
-
|
|
136
128
|
#### Configuring Map Styles
|
|
137
129
|
|
|
138
130
|
You can configure multiple map styles that users can switch between. The map will initially open with the first style in the array, or the one marked with `isDefault: true`.
|
|
@@ -390,6 +382,7 @@ However, if you need different locations per language (e.g., different office ad
|
|
|
390
382
|
### Multi-language Support
|
|
391
383
|
|
|
392
384
|
Built-in translations for:
|
|
385
|
+
|
|
393
386
|
- English
|
|
394
387
|
- German (Deutsch)
|
|
395
388
|
- French (Français)
|
|
@@ -458,13 +451,15 @@ export default {
|
|
|
458
451
|
{
|
|
459
452
|
id: "skatespots",
|
|
460
453
|
name: "My Skatespots",
|
|
461
|
-
apiUrl:
|
|
454
|
+
apiUrl:
|
|
455
|
+
"https://codeberg.org/premiate-edizioni/strapi-plugin-maplibre-field/raw/branch/main/samples/skatespots.geojson",
|
|
462
456
|
enabled: true,
|
|
463
457
|
},
|
|
464
458
|
{
|
|
465
459
|
id: "skateshops",
|
|
466
460
|
name: "My Skateshops",
|
|
467
|
-
apiUrl:
|
|
461
|
+
apiUrl:
|
|
462
|
+
"https://codeberg.org/premiate-edizioni/strapi-plugin-maplibre-field/raw/branch/main/samples/skateshops.geojson",
|
|
468
463
|
enabled: false,
|
|
469
464
|
},
|
|
470
465
|
],
|
|
@@ -621,17 +616,17 @@ interface LocationFeature {
|
|
|
621
616
|
type: "Feature";
|
|
622
617
|
geometry: {
|
|
623
618
|
type: "Point";
|
|
624
|
-
coordinates: [number, number];
|
|
619
|
+
coordinates: [number, number]; // [longitude, latitude]
|
|
625
620
|
};
|
|
626
621
|
properties: {
|
|
627
|
-
name?: string;
|
|
628
|
-
address?: string;
|
|
629
|
-
source?: string;
|
|
630
|
-
sourceId?: string;
|
|
622
|
+
name?: string; // POI name or short location name
|
|
623
|
+
address?: string; // Full formatted address
|
|
624
|
+
source?: string; // "nominatim" or custom source ID (e.g., "fotta-skatespots")
|
|
625
|
+
sourceId?: string; // Original ID from the source
|
|
631
626
|
sourceLayer?: string; // Display name of the source (e.g., "Fotta Skatespots")
|
|
632
|
-
category?: string;
|
|
627
|
+
category?: string; // POI type/category (e.g., "skating_spot", "bus_stop")
|
|
633
628
|
inputMethod?: string; // How it was created: "search" | "poi_click" | "map_click"
|
|
634
|
-
metadata?: object;
|
|
629
|
+
metadata?: object; // Original metadata from the source
|
|
635
630
|
};
|
|
636
631
|
}
|
|
637
632
|
```
|
|
@@ -706,16 +701,16 @@ When double-clicking on an empty area (no POI within snap radius), only coordina
|
|
|
706
701
|
|
|
707
702
|
### Properties Reference
|
|
708
703
|
|
|
709
|
-
| Property | Type | Description
|
|
710
|
-
| ------------- | -------- |
|
|
711
|
-
| `name` | `string` | POI name or short location name
|
|
712
|
-
| `address` | `string` | Full formatted address (from Nominatim or reverse geocoding)
|
|
713
|
-
| `source` | `string` | Data source: `"nominatim"` or custom source ID
|
|
714
|
-
| `sourceId` | `string` | Original identifier from the source
|
|
715
|
-
| `sourceLayer` | `string` | Human-readable name of the source layer
|
|
716
|
-
| `category` | `string` | POI type/category (e.g., `"skating_spot"`, `"bus_stop"`)
|
|
704
|
+
| Property | Type | Description |
|
|
705
|
+
| ------------- | -------- | ----------------------------------------------------------------------- |
|
|
706
|
+
| `name` | `string` | POI name or short location name |
|
|
707
|
+
| `address` | `string` | Full formatted address (from Nominatim or reverse geocoding) |
|
|
708
|
+
| `source` | `string` | Data source: `"nominatim"` or custom source ID |
|
|
709
|
+
| `sourceId` | `string` | Original identifier from the source |
|
|
710
|
+
| `sourceLayer` | `string` | Human-readable name of the source layer |
|
|
711
|
+
| `category` | `string` | POI type/category (e.g., `"skating_spot"`, `"bus_stop"`) |
|
|
717
712
|
| `inputMethod` | `string` | How the location was selected: `"search"`, `"poi_click"`, `"map_click"` |
|
|
718
|
-
| `metadata` | `object` | Additional metadata from the source (varies by source)
|
|
713
|
+
| `metadata` | `object` | Additional metadata from the source (varies by source) |
|
|
719
714
|
|
|
720
715
|
**Note**: All properties are optional and only included when available. Empty strings and null values are automatically omitted.
|
|
721
716
|
|