@arenarium/maps 1.0.181 → 1.0.182
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 +10 -6
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -172,10 +172,10 @@ import { GoogleMapsDarkStyle, GoogleMapsLightStyle } from '@arenarium/maps/googl
|
|
|
172
172
|
const mapTypeLight = new google.maps.StyledMapType(GoogleMapsLightStyle, { name: 'Light Map' });
|
|
173
173
|
const mapTypeDark = new google.maps.StyledMapType(GoogleMapsDarkStyle, { name: 'Dark Map' });
|
|
174
174
|
|
|
175
|
-
mapGoogle.mapTypes.set(
|
|
176
|
-
mapGoogle.mapTypes.set(
|
|
175
|
+
mapGoogle.mapTypes.set('light-id', mapTypeLight);
|
|
176
|
+
mapGoogle.mapTypes.set('dark-id', mapTypeDark);
|
|
177
177
|
|
|
178
|
-
mapGoogle.setMapTypeId(
|
|
178
|
+
mapGoogle.setMapTypeId('light-id'); // or "dark-id" for dark theme
|
|
179
179
|
```
|
|
180
180
|
|
|
181
181
|
## Markers
|
|
@@ -204,7 +204,7 @@ for (let i = 0; i < count; i++) {
|
|
|
204
204
|
// The longitude of the marker's location
|
|
205
205
|
lng: ...,
|
|
206
206
|
// The tooltip configuration of the marker (required)
|
|
207
|
-
tooltip: {
|
|
207
|
+
tooltip: {
|
|
208
208
|
style: {
|
|
209
209
|
// The desired height of the marker's tooltip area
|
|
210
210
|
height: ...,
|
|
@@ -216,7 +216,7 @@ for (let i = 0; i < count; i++) {
|
|
|
216
216
|
radius: ...,
|
|
217
217
|
},
|
|
218
218
|
// Callback function that returns the HTMLElement object for the tooltip body
|
|
219
|
-
body: async (id) => { ... }
|
|
219
|
+
body: async (id) => { ... }
|
|
220
220
|
},
|
|
221
221
|
// The pin configuration of the marker (optional)
|
|
222
222
|
pin: {
|
|
@@ -274,11 +274,15 @@ You can change the markers style by using the predefined CSS variables:
|
|
|
274
274
|
--arenarium-maps-pin-border: ...;
|
|
275
275
|
--arenarium-maps-pin-shadow: ...;
|
|
276
276
|
|
|
277
|
-
--arenarium-maps-tooltip-background: ...;
|
|
277
|
+
--arenarium-maps-tooltip-background: ...;
|
|
278
278
|
--arenarium-maps-tooltip-shadow: ...;
|
|
279
279
|
--arenarium-maps-tooltip-shadow-hover: ...;
|
|
280
280
|
```
|
|
281
281
|
|
|
282
|
+
## Logs
|
|
283
|
+
|
|
284
|
+
Some events and errors are logged to via the api. These logs are used for debugging and monitoring purposes in order to improve the library. To enable or disable logging, set the `api.log.enabled` property to `true` or `false` in the map configuration. By default, logging is disabled for development environments.
|
|
285
|
+
|
|
282
286
|
# Examples
|
|
283
287
|
|
|
284
288
|
[https://github.com/arenarium-dev/arenarium-maps-svelte-kit-example](https://github.com/arenarium-dev/arenarium-maps-svelte-kit-example)
|