-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #367 from UniversityRadioYork/alyx-new-map
Change map to use OSM
- Loading branch information
Showing
8 changed files
with
36 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,7 @@ | ||
/*global google:true placeName*/ | ||
|
||
$(document).ready(function () { | ||
//Google Maps JS | ||
//Set Map | ||
function initialize() { | ||
var uryLocation = new google.maps.LatLng(Lat, Lng); | ||
var mapOptions = { | ||
zoom: 15, | ||
center: uryLocation | ||
}; | ||
|
||
var map = new google.maps.Map(document.getElementById("map"), mapOptions); | ||
//Callout Content | ||
var contentString = placeName; | ||
//Set window width + content | ||
var infowindow = new google.maps.InfoWindow({ | ||
content: contentString, | ||
maxWidth: 500 | ||
}); | ||
|
||
//Add Marker | ||
var marker = new google.maps.Marker({ | ||
position: uryLocation, | ||
map, | ||
title: placeName | ||
}); | ||
|
||
//Resize Function | ||
google.maps.event.addDomListener(window, "resize", function () { | ||
var center = map.getCenter(); | ||
google.maps.event.trigger(map, "resize"); | ||
map.setCenter(center); | ||
}); | ||
} | ||
|
||
google.maps.event.addDomListener(window, "load", initialize); | ||
}); | ||
var map = L.map('map').setView([Lat, Lng], 15); | ||
L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', { | ||
maxZoom: 19, | ||
attribution: '© <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>' | ||
}).addTo(map); | ||
var marker = L.marker([Lat, Lng]).addTo(map); | ||
marker.bindPopup("University Radio York").openPopup(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters