resolved uncaught js error
This commit is contained in:
@@ -1,11 +1,28 @@
|
||||
function mp_init_map() {
|
||||
var location = {lat: 38.8833, lng: -77.0167};
|
||||
var map = new google.maps.Map(document.getElementById("map"), {
|
||||
zoom: 12,
|
||||
center: location
|
||||
});
|
||||
var marker = new google.maps.Marker({
|
||||
position: location,
|
||||
map: 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,
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user