⚡ 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:
@@ -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 = "";
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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",
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user