Skip to content

Commit

Permalink
Merge pull request #69 from GeoGuess/feature/67-bugpolygonGeojson
Browse files Browse the repository at this point in the history
Fixs #67 Streetview search radius + #68 Firebase config
  • Loading branch information
BilelJegham authored Dec 20, 2020
2 parents 765e114 + 1763ab7 commit d4c7da2
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/components/home/SearchBox.vue
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export default {
this.isLoading = true;
// Lazily load input items
axios
.get(`https://photon.komoot.de/api/?q=${encodeURI(val)}`)
.get(`https://photon.komoot.io/api/?q=${encodeURI(val)}`)
.then((res) => {
if (res.status === 200 && res.data && res.data.features) {
this.entries = res.data.features.filter(
Expand Down
16 changes: 9 additions & 7 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,18 @@ window.addEventListener('resize', () => {

var firebaseConfig = {
apiKey: process.env.VUE_APP_FIREBASE_API_KEY,
authDomain: process.env.VUE_APP_FIREBASE_PROJECT_ID + '.firebaseapp.com',
authDomain:
process.env.VUE_APP_FIREBASE_AUTH_DOMAIN ||
process.env.VUE_APP_FIREBASE_PROJECT_ID + '.firebaseapp.com',
databaseURL:
process.env.VUE_APP_FIREBASE_DATABASE_URL ||
'https://' +
process.env.VUE_APP_FIREBASE_PROJECT_ID +
'.firebaseio.com',
process.env.VUE_APP_FIREBASE_PROJECT_ID +
'.firebaseio.com',
projectId: process.env.VUE_APP_FIREBASE_PROJECT_ID,
storageBucket: process.env.VUE_APP_FIREBASE_PROJECT_ID + '.appspot.com',
storageBucket:
process.env.VUE_APP_STORAGE_BUCKET ||
process.env.VUE_APP_FIREBASE_PROJECT_ID + '.appspot.com',
messagingSenderId: process.env.VUE_APP_FIREBASE_MESSAGING_SENDER_ID,
appId: process.env.VUE_APP_FIREBASE_APP_ID,
measurementId: process.env.VUE_APP_FIREBASE_MEASUREMENT_ID,
Expand All @@ -50,9 +55,6 @@ var firebaseConfig = {
firebase.initializeApp(firebaseConfig);
firebase.analytics();

// eslint-disable-next-line no-console
console.info('Version : ' + process.env.VUE_APP_VERSION);

new Vue({
vuetify,
router,
Expand Down
2 changes: 2 additions & 0 deletions src/pages/StreetView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -184,9 +184,11 @@ export default {
position = feature.geometry.coordinates;
point = true;
} else {
point = true;
position = randomPositionInPolygon(feature);
}
} else {
point = true;
position = randomPositionInPolygon(this.placeGeoJson);
}
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/components/home/SearchBox.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ describe('SearchBox.vue', () => {
expect(wrapper.exists('#search-input'));
wrapper.vm.$nextTick(() => {
expect(axios.get).toBeCalledWith(
'https://photon.komoot.de/api/?q=Toulouse'
'https://photon.komoot.io/api/?q=Toulouse'
);
wrapper.vm.$nextTick(() => {
expect(wrapper.vm.entries).toHaveLength(2);
Expand Down

0 comments on commit d4c7da2

Please sign in to comment.