Remove dutch hardcoded texts for now; add a simple bikeshop quest

This commit is contained in:
Pieter Vander Vennet 2020-07-20 16:55:16 +02:00
parent 5670b04a71
commit 5116626816
4 changed files with 80 additions and 27 deletions

View file

@ -8,8 +8,8 @@ import {Basemap} from "../Logic/Basemap";
export class SearchAndGo extends UIElement {
private _placeholder = new UIEventSource("Zoek naar een locatie...")
private _searchField = new TextField(this._placeholder);
private _placeholder = new UIEventSource("Search a location...")
private _searchField = new TextField(this._placeholder, undefined);
private _foundEntries = new UIEventSource([]);
private _map: Basemap;
@ -35,7 +35,7 @@ export class SearchAndGo extends UIElement {
private RunSearch() {
const searchString = this._searchField.value.data;
this._searchField.Clear();
this._placeholder.setData("Bezig met zoeken...");
this._placeholder.setData("Searching...");
const self = this;
Geocoding.Search(searchString, this._map, (result) => {
@ -50,10 +50,10 @@ export class SearchAndGo extends UIElement {
[bb[1], bb[3]]
]
self._map.map.fitBounds(bounds);
this._placeholder.setData("Zoek naar een locatie...");
this._placeholder.setData("Search a location...");
},
() => {
this._placeholder.setData("Niets gevonden: er ging iets mis");
this._placeholder.setData("Something went wrong. Try again.");
});
}