Skip to content

Commit

Permalink
Update MapScript.js
Browse files Browse the repository at this point in the history
  • Loading branch information
joh13010 committed Jan 4, 2017
1 parent 4c5e55f commit 7c9ebbd
Showing 1 changed file with 12 additions and 16 deletions.
28 changes: 12 additions & 16 deletions MapScript.js
Original file line number Diff line number Diff line change
@@ -1,23 +1,12 @@
var map;
var myLocation = {lat: 43.3095, lng: -73.644};

function addMarker(lt, ln, prov)
{
console.log("Latitude: " + lt + ". Longitude: " + ln);
var location = {lat: lt, lng: ln};
var marker = new google.maps.Marker({
position: location,
map: map
});
marker.setMap(map);
}

function initMap() {
var myLatLng = myLocation;

var map = new google.maps.Map(document.getElementById('map'), {
zoom: 15,
center: myLatLng,
center: myLocation,
rotateControl: true
});

Expand All @@ -28,9 +17,16 @@ function initMap() {
title: 'Hello World!'
}); */

/*var infoWindow = new google.maps.InfoWindow({content:"Hello"});
google.maps.event.addListener(marker,'click',function(e){
}

infoWindow.open(map, marker);
});*/
function addMarker(lt, ln, prov)
{
// Troubleshooting call:
console.log("Latitude: " + lt + ". Longitude: " + ln);

var location = {lat: lt, lng: ln};
var marker = new google.maps.Marker({
position: new google.maps.LatLng(lt, ln),
map: map
});
}

0 comments on commit 7c9ebbd

Please sign in to comment.