etewiah / property_web_builder

Create a fully featured real estate website on Rails in minutes! ⛺
https://propertywebbuilder.com
MIT License
545 stars 257 forks source link

Googke Maps Api Key #116

Closed fdc263 closed 3 years ago

fdc263 commented 3 years ago

How I do setup my api key to avoid errors loading maps?

Currently gem is using the key AIzaSyCPorm8YzIaUGhKfe5cvpgofZ_gdT8hdZw and raising Google Maps JavaScript API error: RefererNotAllowedMapError

etewiah commented 3 years ago

Hi there. Right now there isn't an option in the UI to update the gmaps api key. I'm open to a pull request for this ;)

fdc263 commented 3 years ago

Do you have any implementation suggestions

etewiah commented 3 years ago

You could save a value in the website model and inject that in the vue-main.js file where the current key is hardcoded.

fdc263 commented 3 years ago

has this already been implemented in pwb-premium? can you port the implementation here?

etewiah commented 3 years ago

pwb-premium uses rails 6 with webpacker and I set the key in the webpack config which is not available in this project. I can create an instance of pwb-premium for you to try out if you wish. I'll send you an email about this.