-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use new map markers and more work on Journeys
- Loading branch information
1 parent
2a08a65
commit c17169a
Showing
44 changed files
with
397 additions
and
119 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,65 @@ | ||
import {GeoLatLng} from './GeoPosition'; | ||
import {SyncItem} from './SyncItem'; | ||
|
||
export class WayPoint{ | ||
|
||
export interface ISyncItem { | ||
_sync: SyncItem; | ||
} | ||
|
||
class JourneyBaseItem implements ISyncItem { | ||
public Title: string; | ||
public Notes: string; | ||
public _sync: SyncItem; | ||
|
||
constructor(itemType: string, schemaVersion:number) { | ||
this._sync = new SyncItem(itemType, schemaVersion); | ||
} | ||
} | ||
|
||
export class BookmarkedPOI extends JourneyBaseItem implements ISyncItem { | ||
public PoiID: number; | ||
public Type: string; | ||
public Poi: any; | ||
|
||
public _sync: SyncItem; | ||
} | ||
|
||
export class WayPoint extends JourneyBaseItem { | ||
|
||
public Stage: number; | ||
public Position: GeoLatLng; | ||
public PoiIDs:Array<number>; | ||
public PoiList: Array<any>; | ||
|
||
public PoiIDs: Array<number>; | ||
public PoiList: Array<BookmarkedPOI>; | ||
|
||
public constructor() { | ||
super("waypoint", 1); | ||
} | ||
|
||
} | ||
|
||
export class Journey{ | ||
public ID:string; | ||
public Title:string; | ||
public Notes: string; | ||
export class JourneyStage extends JourneyBaseItem { | ||
|
||
public WayPoints: Array<WayPoint>; | ||
|
||
public constructor(){ | ||
this.ID = ""+Date.now; | ||
this.WayPoints=[]; | ||
|
||
public constructor() { | ||
super("journey_stage", 1); | ||
|
||
this.WayPoints = []; | ||
} | ||
} | ||
|
||
export class Journey extends JourneyBaseItem { | ||
|
||
public ID: string; | ||
|
||
public Stages: Array<JourneyStage>; | ||
|
||
|
||
|
||
public constructor() { | ||
super("journey", 1); | ||
this.ID = "" + Date.now(); | ||
this.Stages = []; | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
export class SyncItem { | ||
|
||
public itemType: string; | ||
public itemId: string; | ||
public version: number; | ||
public schemaVersion: number; | ||
public syncTimeStamp: string; | ||
|
||
public constructor(itemType: string, schemaVersion: number) { | ||
this.itemType = itemType; | ||
this.itemId = SyncItem.getNewItemId(); | ||
this.version = 1; | ||
this.schemaVersion = schemaVersion; | ||
this.syncTimeStamp = SyncItem.getNewSyncTimeStamp(); | ||
|
||
} | ||
public static getNewSyncTimeStamp() { | ||
return Date.now().toString(); | ||
} | ||
public static getNewItemId() { | ||
return "_syncitem_" + Date.now().toString(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.