Embed a Store Locator without plugins with Google Maps API

9 2 2

Hi Everyone!


I'm trying to embed a store locator without using plugins. I'm using the Google Maps JavaScript API. But I don't know if I'm doing it in the right way.

I created a new page, in the body of the page in the option of <html> code I embed this:




<script src="https://polyfill.io/v3/polyfill.min.js?features=default"></script>
<script src="assets/stores.js" defer="defer"></script>
<script src="assets/theme.js" defer="defer"></script>
<!-- The div to hold the map -->
<div id="map"></div>
<script src="app.js"></script>
<script async="" defer="defer" src="https://maps.googleapis.com/maps/api/js?key=AIzaSyDlMk8xN7Z-Cq1aBdPVrp5A7Vy7chXw0DY&amp;libraries=places&amp;callback=initMap">// <![CDATA[

// ]]></script>




The script part of:




<script src="assets/theme.js" defer="defer"></script>




Here I paste all the .js part of the map. And the map looks great, but when I need my store markers, didn't get call. In the part:



<script src="assets/stores.js" defer="defer"></script>


It's suppose to call the store description, the description is written in JSON but I read that you can link JSON files saving it in JS files.


I hope someone can help me.

My page url: https://danel-testing-page.myshopify.com

The password: pewlya


I'm beginner in web development.