Project Configuration
You will find app configuration in this file : app/config.js
Configure your google places API KEY (webservice)
Generate your Google Places API key webservices following these instruction
Then add your key to in app/config.js by modifying const googleApiKey
.
Example :
const googleApiKey = 'AIzaSyD03j3w7psTROTBl-rMJjbidi-aZUAV7Ng';
Add / Change a picture
To change a picture, you just have to change asset name :
Example to change picture of cafe pin's (picture displayed on the map) :
1- Add a new picture name
cafe_pins_new.png
in app/assets/.2- Replace the line :
import pointOfInterestPins from './assets/cafe_pins2.png';
by
import pointOfInterestPins from './assets/cafe_pins_new.png';
Example to change picture of cafe filter :
1- Add a new picture name
cafe_filter_new.png
in app/assets/.2- Replace the line :
import filterCafe from './assets/cafe_filter.png';
by
import filterCafe from './assets/cafe_filter_new.png';
Add a new filter
1 - Add your new picture in asset folder and import it as seen in previous paragraph (Add / Change a picture).
2- Select the type of places in types supported by google places (full documentation here )
3- Add the new type inconst storeTypes
array
Example to add "restaurants" :
1- Add two new pictures :
A/ The pins (picture on the map)
restaurant_pins.png
in app/assets/.B/ The filter picture
restaurant_filter.png
in app/assets/.2- Add the two new constants in
config.js
:import restaurantPins from './assets/restaurant_pins.png'; import filterRestaurant from './assets/restaurant_filter.png';
3- Add new type to store Types array
const storeTypes = [
/*... EXISTING TYPES ...*/,
{ ref: 'restaurant', pins: restaurantPins, filterImg: filterRestaurant }
];