-
Notifications
You must be signed in to change notification settings - Fork 0
/
template-where.php
executable file
·125 lines (112 loc) · 3.99 KB
/
template-where.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
<?php
/*
Template Name: Where Template
*/
?>
<div class="map">
<div id="map_canvas" style="width: 100%; height: 100%"></div>
</div>
<section class="map-overlay hidden-xs">
<div class="row">
<div class="col col-xs-12">
<?php get_template_part('templates/page', 'header'); ?>
</div>
</div>
<div class="row">
<div class="col col-xs-5">
<div class="box">
<div class="row">
<div class="col col-xs-5">
<img src="<?php echo get_template_directory_uri(); ?>/assets/img/BST.jpg" class="img-thumbnail img-responsive">
<!--
<a class="btn btn-warning margin-top-20" href="https://www.google.com/maps/views/view/109291867098216000411/photo/quWvYUn4XJgAAAQW4fVg5A" target="_blank">
360° Ansicht
</a>
-->
</div>
<div class="col col-xs-7">
<address>
<h4>standort<strong>beilstein</strong></h4>
oberstenfelderstr. 16<br>
d-71717 beilstein<br>
<abbr title="Phone">p:</abbr> <a href="tel:+49706294990">+49 (0)7062 94990</a>
</address>
</div>
</div>
</div>
<div class="box margin-top-20">
<div class="row">
<div class="col col-xs-5">
<img src="<?php echo get_template_directory_uri(); ?>/assets/img/STH.jpg" class="img-thumbnail img-responsive">
<!--
<a class="btn btn-warning margin-top-20" href="https://www.google.com/maps/views/view/109291867098216000411/photo/quWvYUn4XJgAAAQW4fVg5A" target="_blank" disabled>
360° Ansicht
</a>
-->
</div>
<div class="col col-xs-7">
<address>
<h4>standort<strong>steinheim</strong></h4>
friedrichstraße 8<br>
d-71711 steinheim<br>
<abbr title="Phone">p:</abbr> <a href="tel:+49714481550">+49 (0)7144 81550</a>
</address>
</div>
</div>
</div>
</div>
</div>
</section>
<script>
function removeElement(element) {
element && element.parentNode && element.parentNode.removeChild(element);
}
function initialize() {
var LAT = 49.00882560981354; //49.037142923228565;
var LNG = 9.300613403320312; //9.316268985858177;
google.maps.visualRefresh = true;
var mapOptions = {
zoom: 12,
center: new google.maps.LatLng(LAT,LNG),
scrollwheel: false,
mapTypeId: google.maps.MapTypeId.TERRAIN,
panControlOptions: {
position: google.maps.ControlPosition.RIGHT_CENTER
},
mapTypeControlOptions: {
position: google.maps.ControlPosition.RIGHT_CENTER,
style: google.maps.MapTypeControlStyle.DROPDOWN_MENU
},
zoomControlOptions: {
position: google.maps.ControlPosition.RIGHT_CENTER
}
}
var map = new google.maps.Map(document.getElementById("map_canvas"), mapOptions);
var geocoder = new google.maps.Geocoder();
var codeAddress = function( address ) {
geocoder.geocode( { 'address': address }, function(results, status) {
if (status === google.maps.GeocoderStatus.OK) {
new google.maps.Marker({ map: map, position: results[0].geometry.location });
}
});
};
codeAddress('Reisebüro Rode GmbH, Oberstenfelderstr.16, D-71717 Beilstein');
codeAddress('Reisebüro Rode GmbH, Friedrichstraße 8, D-71711 Steinheim');
google.maps.event.addListener(map, "rightclick", function(event) {
var lat = event.latLng.lat();
var lng = event.latLng.lng();
// populate yor box/field with lat, lng
console.log("Lat=" + lat + "; Lng=" + lng);
});
setTimeout(function(){
removeElement( document.getElementById('spinner') );
},250);
}
function loadScript() {
var script = document.createElement("script");
script.type = "text/javascript";
script.src = "http://maps.googleapis.com/maps/api/js?key=AIzaSyCxK3Bptr99EqBmhLW0ezLhvGhhrKuc2RA&sensor=FALSE&callback=initialize";
document.body.appendChild(script);
}
window.onload = loadScript;
</script>