浏览代码

Add pin to Location maps

Scot Hacker 8 年之前
父节点
当前提交
39214b54bf
共有 1 个文件被更改,包括 8 次插入0 次删除
  1. 8 0
      bakerydemo/templates/locations/location_page.html

+ 8 - 0
bakerydemo/templates/locations/location_page.html

@@ -33,6 +33,14 @@
           },
           zoom: 8
         });
+        var marker = new google.maps.Marker({
+          position: {
+              lat: {{lat}},
+              lng: {{long}}
+          },
+          map: map,
+          title: '{{page.title}}'
+        });
       }
     </script>
     <script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyD31CT9P9KxvNUJOwDq2kcFEIG8ADgaFgw&callback=initMap" async defer></script>