mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 00:16:46 +02:00
MDL-34959 add Google Maps API V3 support
This commit is contained in:
parent
b32ec7a3b9
commit
cec7d43591
4 changed files with 36 additions and 3 deletions
|
@ -41,3 +41,21 @@ M.core_iplookup.init = function(Y, latitude, longitude) {
|
|||
}, document.body);
|
||||
}
|
||||
};
|
||||
|
||||
M.core_iplookup.init3 = function(Y, latitude, longitude, ip) {
|
||||
var ipLatlng = new google.maps.LatLng(latitude, longitude);
|
||||
|
||||
var mapOptions = {
|
||||
center: ipLatlng,
|
||||
zoom: 6,
|
||||
mapTypeId: google.maps.MapTypeId.ROADMAP
|
||||
};
|
||||
|
||||
var map = new google.maps.Map(document.getElementById("map"), mapOptions);
|
||||
|
||||
var marker = new google.maps.Marker({
|
||||
position: ipLatlng,
|
||||
map: map,
|
||||
title: ip
|
||||
});
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue