29 lines
608 B
JavaScript
29 lines
608 B
JavaScript
function mp_init_map() {
|
|
var locations = [
|
|
{lat: 38.8833, lng: -77.0167},
|
|
{lat: 39.8833, lng: -76.0167},
|
|
];
|
|
var map = new google.maps.Map(
|
|
document.getElementById("ljdp_map"),
|
|
{
|
|
zoom: 5,
|
|
disableDefaultUI: true,
|
|
center: locations[0],
|
|
}
|
|
);
|
|
var marker, icon;
|
|
// icon = "/wp-content/plugins/map_prof/marker.png";
|
|
icon = {
|
|
//url: document.location.href + "marker.png",
|
|
url: "/wp-content/plugins/map_prof/marker.png",
|
|
scaledSize: new google.maps.Size(35, 50)
|
|
};
|
|
for (loc of locations) {
|
|
marker = new google.maps.Marker({
|
|
position: loc,
|
|
map: map,
|
|
icon: icon,
|
|
});
|
|
};
|
|
}
|