diff --git a/demo/views/add-a-marker.hbs b/demo/views/add-a-marker.hbs index 3da2f11..fbd762f 100644 --- a/demo/views/add-a-marker.hbs +++ b/demo/views/add-a-marker.hbs @@ -43,7 +43,11 @@ map.on('load', () => { const { lat, lng } = map.getCenter(); - marker = Radar.ui.marker({ text: `${lat}, ${lng}` }) + marker = Radar.ui.marker({ + popup: { + text: `${lat}, ${lng}`, + }, + }) .setLngLat([lng, lat]) .addTo(map); @@ -59,8 +63,10 @@ } const { lat, lng } = map.getCenter(); marker = Radar.ui.marker({ - image: { url }, - text: `${lat}, ${lng}`, + url, + popup: { + text: `${lat}, ${lng}`, + }, }) .setLngLat([lng, lat]) .addTo(map); diff --git a/demo/views/start-a-trip.hbs b/demo/views/start-a-trip.hbs index 8a8bd13..fd2a5b0 100644 --- a/demo/views/start-a-trip.hbs +++ b/demo/views/start-a-trip.hbs @@ -111,7 +111,11 @@ <p>${location.latitude},${location.longitude}</p> `.trim(); - const userMarker = Radar.ui.marker({ html: userContent }) + const userMarker = Radar.ui.marker({ + popup: { + html: userContent, + }, + }) .setLngLat([location.longitude, location.latitude]) .addTo(map); @@ -122,7 +126,12 @@ <p>${user.trip.destinationGeofenceExternalId}</p> `.trim(); - const destMarker = Radar.ui.marker({ html: destContent, color: '#FF6F00' }) + const destMarker = Radar.ui.marker({ + color: '#FF6F00', + popup: { + html: destContent, + }, + }) .setLngLat(user.trip.destinationLocation.coordinates) .addTo(map); @@ -197,7 +206,7 @@
${location.latitude},${location.longitude}
`.trim(); - const userMarker = Radar.ui.marker({ html: userHtml }) + const userMarker = Radar.ui.marker({ popup: { html: userHtml }}) .setLngLat([location.longitude, location.latitude]) .addTo(map); @@ -208,7 +217,12 @@${user.trip.destinationGeofenceExternalId}
`.trim(); - destMarker = Radar.ui.marker({ html: destHtml, color: '#FF6F00' }) + destMarker = Radar.ui.marker({ + color: '#FF6F00', + popup: { + html: destHtml, + }, + }) .setLngLat(user.trip.destinationLocation.coordinates) .addTo(map); } diff --git a/demo/views/track-a-user.hbs b/demo/views/track-a-user.hbs index b418c37..1d031f0 100644 --- a/demo/views/track-a-user.hbs +++ b/demo/views/track-a-user.hbs @@ -89,7 +89,7 @@ <p>${location.latitude},${location.longitude}</p> `.trim(); - const marker = Radar.ui.marker({ html }) + const marker = Radar.ui.marker({ popup: { html }}) .setLngLat([location.longitude, location.latitude]) .addTo(map); }); @@ -144,7 +144,7 @@${location.latitude},${location.longitude}
`.trim(); - const marker = Radar.ui.marker({ html }) + const marker = Radar.ui.marker({ popup: { html }}) .setLngLat([location.longitude, location.latitude]) .addTo(map); diff --git a/src/types.ts b/src/types.ts index 228d713..f4a6306 100644 --- a/src/types.ts +++ b/src/types.ts @@ -463,22 +463,30 @@ export interface RadarMapOptions extends Omit