forked from Biplob14/Restaurant-Finding-System
-
Notifications
You must be signed in to change notification settings - Fork 0
/
map.php
49 lines (43 loc) · 2.13 KB
/
map.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
<script>
function initMap() {
var map = new google.maps.Map(document.getElementById('map'), {
zoom: 12,
center: {lat: 23.8223, lng: 90.3654}
});
// Create an array of alphabetical characters used to label the markers.
var labels = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
// Add some markers to the map.
// Note: The code uses the JavaScript Array.prototype.map() method to
// create an array of markers based on a given "locations" array.
// The map() method here has nothing to do with the Google Maps API.
var markers = locations.map(function(location, i) {
return new google.maps.Marker({
position: location,
label: labels[i % labels.length]
});
});
// Add a marker clusterer to manage the markers.
var markerCluster = new MarkerClusterer(map, markers,
{imagePath: 'https://developers.google.com/maps/documentation/javascript/examples/markerclusterer/m'});
}
var locations = [
{lat: 23.746877, lng: 90.370579}, //nostalgic cafe- okay
{lat: 23.746507, lng: 90.370671}, //cilantro-
{lat: 23.746107, lng: 90.371166}, //the dark music cafe- okay
{lat: 23.745149, lng: 90.371761}, //kabooz
{lat: 23.746179, lng: 90.371648}, //cafe majlish
{lat: 23.743729, lng: 90.373536}, //kfc
{lat: 23.816968, lng: 90.356215}, //club 13 restaurant
{lat: 23.811619, lng: 90.356537}, //cafe barista
{lat: 23.811482, lng: 90.355292}, //cha pata cafe
{lat: 23.875874, lng: 90.389542}, //the prandium
{lat: 23.873176, lng: 90.390701}, //haveil
{lat: 23.872373, lng: 90.391121}, //cross roads restaurant and longue
{lat: 23.872101, lng: 90.390681}, //halvetia
]
</script>
<script src="https://developers.google.com/maps/documentation/javascript/examples/markerclusterer/markerclusterer.js">
</script>
<script async defer
src="https://maps.googleapis.com/maps/api/js?key=AIzaSyAtRGq1wK1Pn7Qw_WcFiKqX84-4SkXq30c&callback=initMap">
</script>