if an event has geo coordinates, add links to routing on OSM, with correct place and zoom of 14, 3 buttons to get routig as car, bike, and by feet.

Signed-off-by: Baptiste Lemoine <contact@cipherbliss.com>
This commit is contained in:
ty kayn
2020-12-17 11:26:25 +01:00
committed by Thomas Citharel
parent c8fb5bb80e
commit 5c57f1ce3c
15 changed files with 250 additions and 27 deletions

View File

@@ -15,6 +15,12 @@ export interface IAddress {
originId?: string;
}
export interface IPoiInfo {
name: string;
alternativeName: string;
poiIcon: IPOIIcon;
}
export class Address implements IAddress {
country = "";
@@ -54,7 +60,7 @@ export class Address implements IAddress {
this.originId = hash.originId;
}
get poiInfos(): { name: string; alternativeName: string; poiIcon: IPOIIcon } {
get poiInfos(): IPoiInfo {
/* generate name corresponding to poi type */
let name = "";
let alternativeName = "";

View File

@@ -1,4 +1,4 @@
import { InstancePrivacyType, InstanceTermsType } from "./enums";
import { InstancePrivacyType, InstanceTermsType, RoutingType } from "./enums";
import type { IProvider } from "./resource";
export interface IOAuthProvider {
@@ -58,6 +58,9 @@ export interface IConfig {
endpoint: string;
attribution: string | null;
};
routing: {
type: RoutingType;
};
};
geocoding: {
provider: string;

View File

@@ -160,3 +160,15 @@ export enum Openness {
MODERATED = "MODERATED",
OPEN = "OPEN",
}
export enum RoutingType {
OPENSTREETMAP = "OPENSTREETMAP",
GOOGLE_MAPS = "GOOGLE_MAPS",
}
export enum RoutingTransportationType {
FOOT = "FOOT",
BIKE = "BIKE",
TRANSIT = "TRANSIT",
CAR = "CAR",
}