ruby on rails - Fixing "You have included the Google Maps API multiple times on this page. This may cause unexpected errors." -


i've included 2 below scripts in header , error "you have included google maps api multiple times on page. may cause unexpected errors."

<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js key=************"></script>  <script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?libraries=places&sensor=false"></script> 

when remove either script, additional js errors. how can refactor these 2 scripts in rails app?

in example above, you're including same script twice, different parameters. should able solve issue including script once, required parameters this:

<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key=your_key_here&libraries=places&sensor=false"></script>     

Comments

Popular posts from this blog

java - Spring Data JPA: Why findOne(id) executing delete query internally? -

python - Mongodb How to add addtional information when aggregating? -

java - Incorrect order of records in M-M relationship in hibernate -