Map marker now blue, removed parent map that was causing api errors

This commit is contained in:
Austin-Mills 2017-06-23 11:06:21 -04:00
parent 22d8d55f87
commit e328e85e1f
4 changed files with 3 additions and 53 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

View file

@ -72,7 +72,7 @@
geocoder.geocode( { 'address': alpha}, function(results, status) {
map.setCenter(results[0].geometry.location);
var marker = new google.maps.Marker({
map: map, position: results[0].geometry.location});
map: map, icon: "/resources/images/blue_MarkerA.png", position: results[0].geometry.location});

View file

@ -112,57 +112,7 @@
//var map, infoWindow;
var map;
var geocoder;
function initialize() {
geocoder= new google.maps.Geocoder();
var latlng = new google.maps.LatLng(-34.397, 150.644);
var mapOptions = {
zoom: 8,
center: latlng
}
map = new google.maps.Map(document.getElementById('map'), mapOptions);
//map.codeAddress();
}
// function getCoordinates(address, callback){
// var coordinates;
// geocoder.geocode({ address: address}, function (results, status) {
// coords_obj = results[0].geometry.location;
// coordinates = [coords_obj.nb,coords_obj.ob];
// callback(coordinates);
// })
// }
function codeAddress() {
var address1 = /*[[${parent.address}]]*/;
var city = (/*[[${parent.city}]]*/);
var space = " ";
var addressHelp = address1.concat(space);
var state = /*[[${parent.state}]]*/;
var comma = " , ";
var addressHelpHelp = addressHelp.concat(city);
var address = addressHelpHelp.concat(state);
console.log(/*[[${parent.state}]]*/)
console.log(/*[[${parent.address}]]*/);
geocoder.geocode( { 'address': address}, function(results, status) {
if (status == 'OK') {
map.setCenter(results[0].geometry.location);
var marker = new google.maps.Marker({
map: map,
position: results[0].geometry.location
});
} else {
alert('Geocode was not successful for the following reason: ' + status);
}
});
}
@ -230,7 +180,7 @@
</script>
<div id="map" ></div>
<!-- <p th:text="${doctors.doctorList}" /> -->