diff --git a/examples/snowbox/index.js b/examples/snowbox/index.js
index 8134d89c56..2fc418252b 100644
--- a/examples/snowbox/index.js
+++ b/examples/snowbox/index.js
@@ -19,6 +19,7 @@ import pluginLoadingIndicator from '@polar/polar/plugins/loadingIndicator'
import pluginPins from '@polar/polar/plugins/pins'
import pluginPointerPosition from '@polar/polar/plugins/pointerPosition'
import pluginReverseGeocoder from '@polar/polar/plugins/reverseGeocoder'
+import pluginRouting from '@polar/polar/plugins/routing'
import pluginScale from '@polar/polar/plugins/scale'
import pluginToast from '@polar/polar/plugins/toast'
import pluginZoom from '@polar/polar/plugins/zoom'
@@ -488,6 +489,16 @@ addPlugin(
}, */
}),
},
+ {
+ plugin: pluginRouting({
+ type: 'ors',
+ url: 'https://api.openrouteservice.org/v2/directions/',
+ apiKey: '',
+ displayPreferences: true,
+ displayRouteTypesToAvoid: true,
+ }),
+ icon: 'kern-icon-fill--assistant-direction',
+ },
],
[
{
diff --git a/src/architecture.spec.ts b/src/architecture.spec.ts
index 4f524b9f54..a35db3ba20 100644
--- a/src/architecture.spec.ts
+++ b/src/architecture.spec.ts
@@ -35,7 +35,7 @@ describe('Architectural checks', () => {
.matchingPattern('^plugins/.*$')
.should()
.matchPattern(
- '^plugins/[^/]+/((index|locales|store|types)\\.ts|utils/.*\\.ts|components/.*\\.spec\\.ts|stores/.*\\.ts)$'
+ '^plugins/[^/]+/((index|locales|store|types)\\.ts|utils/.*\\.ts|components/.*\\.spec\\.ts|stores/.*\\.ts|composables/.*\\.ts)$'
)
.check()
expect(violations).toEqual([])
diff --git a/src/client.ts b/src/client.ts
index 0595ad1159..6fc6cd943b 100644
--- a/src/client.ts
+++ b/src/client.ts
@@ -20,6 +20,7 @@ import LoadingIndicator from '@/plugins/loadingIndicator'
import Pins from '@/plugins/pins'
import PointerPosition from '@/plugins/pointerPosition'
import ReverseGeocoder from '@/plugins/reverseGeocoder'
+import Routing from '@/plugins/routing'
import Scale from '@/plugins/scale'
import Toast from '@/plugins/toast'
@@ -39,6 +40,9 @@ function addPlugins(map: typeof PolarContainer, enabledPlugins: string[]) {
enabledPlugins.includes('geoLocation') && {
plugin: GeoLocation({ renderType: 'iconMenu' }),
},
+ enabledPlugins.includes('routing') && {
+ plugin: Routing({ type: 'ors', url: '' }),
+ },
].filter((x) => x) as Menu[],
],
})
@@ -85,10 +89,10 @@ function addPlugins(map: typeof PolarContainer, enabledPlugins: string[]) {
*
* @param containerId - ID of the container the map will render itself in.
* @param serviceRegister - Service register given as an array, or a URL to fetch this from.
- * @param mapConfiguration - Configuration options. Only plugins that have a configuration will be created. To
- * enable a plugin with default configuration, add its key with an empty object. The
- * plugins with the ids 'fullscreen', 'geoLocation' and 'layerChooser' are added to the iconMenu.
- * IconMenu. The IconMenu, Toast, LayerChooser and LoadingIndicator are enabled by default.
+ * @param mapConfiguration - Configuration options. Only plugins that have a configuration will be created.
+ * To enable a plugin with default configuration, add its key with an empty object.
+ * The plugins with the ids 'fullscreen', 'geoLocation', 'routing' and 'layerChooser' are added
+ * to the IconMenu. The IconMenu, Toast, LayerChooser and LoadingIndicator are enabled by default.
* @param modifyServiceRegister - Optionally modify the serviceRegister. This may be useful if a pre-existing register is used.
*
* @example
diff --git a/src/components/PolarSelect.ce.vue b/src/components/PolarSelect.ce.vue
index bec61559ff..b9689665e0 100644
--- a/src/components/PolarSelect.ce.vue
+++ b/src/components/PolarSelect.ce.vue
@@ -30,12 +30,14 @@
+
+
diff --git a/src/plugins/routing/components/RoutingInput.ce.vue b/src/plugins/routing/components/RoutingInput.ce.vue
new file mode 100644
index 0000000000..72743b834e
--- /dev/null
+++ b/src/plugins/routing/components/RoutingInput.ce.vue
@@ -0,0 +1,91 @@
+
+