‘;
function map_init()
jQuery(document).ready(function($)
$(‘#map’).hide();
load();
$(‘#map’).fadeIn(1000);
codeAddress();
);
function load()
geocoder = brand-new google.maps.Geocoder();
//directionsDisplay = fresh google.maps.DirectionsRenderer();
var newyork = brand-new google.maps.LatLng(40.69847032728747, -73.9514422416687);
var myOptions =
zoom: 14,
center: newyork,
mapTypeId: google.maps.MapTypeId.ROADMAP,
mapTypeControlOptions:
design: google.maps.MapTypeControlStyle.DROPDOWN_MENU
map = new search engines.maps.Map(document.getElementById(‘map’), myOptions);
//directionsDisplay.setMap(map);
function codeAddress()
geocoder.geocode( ‘address’: address , function(results, status)
if (status == search engines.maps.GeocoderStatus.OK)
marker = fresh google.maps.Marker(
map: map,
icon: redFlag,
//title: title,
animation: google.maps.Animation.DROP,
position: outcomes[0].geometry.location );
map.setCenter(marker.getPosition());
infowindow = brand-new google.maps.InfoWindow(
maxWidth: 230,
content: contentString,
disableAutoPan: false
);
infowindow.open up(map, marker);
google.maps.occasion.addListener(marker, ‘click’, functionality()
infowindow.open up(map,marker);
);
else
(function($)
$(‘#map’).html(‘
Sorry, the address cannot be found.
‘);
return false;
)(jQuery);
);
function showAddress(fromAddress, toAddress)
calcRoute();
calcRoute1();
function calcRoute()
var start = record.getElementById(“fromAdd”).value;
var end = record.getElementById(“toAdd”).value;
var request =
origin: start,
destination: end,
travelMode: google.maps.DirectionsTravelMode.DRIVING
;
directionsService.route(request, functionality(response, status)
if (status == search engines.maps.DirectionsStatus.OK)
directionsDisplay.setDirections(response);
);
//]]>
Apply for this job: Click here