mirror of
https://github.com/nikdoof/vapemap.git
synced 2025-12-25 07:39:21 +00:00
Initial Import.
This commit is contained in:
49
app/stores/templates/stores/store_map.html
Normal file
49
app/stores/templates/stores/store_map.html
Normal file
@@ -0,0 +1,49 @@
|
||||
{% extends "base.html" %}
|
||||
{% load staticfiles %}
|
||||
|
||||
{% block title %}
|
||||
Stores
|
||||
{% endblock %}
|
||||
|
||||
{% block style %}
|
||||
<style type="text/css">
|
||||
#map-canvas-stores {
|
||||
width: 100%;
|
||||
height: 600px;
|
||||
}
|
||||
#geolocation {
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
{% endblock %}
|
||||
|
||||
{% block scripts %}
|
||||
<script type="text/javascript" src="https://maps.google.com/maps/api/js?sensor=false"></script>
|
||||
<script type="text/javascript" src="{% static "js/gmap.js" %}"></script>
|
||||
<script type="text/javascript" src="{% static "js/geolocation.js" %}"></script>
|
||||
<script type="text/javascript">
|
||||
var stores = [
|
||||
{% for store in store_list %}{% if store.address.geo_latitude %}['{{ store }}', {{ store.address.geo_latitude }}, {{ store.address.geo_longitude }}, {{ store.store_type }}, '{% url "store-detail" store.slug %}'],{% endif %}
|
||||
{% endfor %}
|
||||
];
|
||||
$(document).ready(function(){initialize_map(stores, document.getElementById('map-canvas-stores'))});
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="jumbotron">
|
||||
<p class="lead">
|
||||
{{ site.name }} lists {{ store_count }} stores, and {{ chain_count }} chains across the UK and Ireland.
|
||||
</p>
|
||||
<p id="geolocation"><a class="btn btn-large">Find Stores Near Me.</a></p>
|
||||
</div>
|
||||
<div class="row-fluid">
|
||||
<div class="span8 offset2">
|
||||
<div id="map-canvas-stores" class="map">
|
||||
<noscript>
|
||||
You need Javascript enabled to view the map.
|
||||
</noscript>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user