Move some javascript functions out of global scope
This commit is contained in:
parent
8568c93703
commit
bd2e999756
10 changed files with 60 additions and 65 deletions
|
@ -26,7 +26,7 @@ $(document).ready(function () {
|
|||
}
|
||||
|
||||
if ($("#map").hasClass("set_location")) {
|
||||
var marker = L.marker([0, 0], {icon: getUserIcon()});
|
||||
var marker = L.marker([0, 0], {icon: OSM.getUserIcon()});
|
||||
|
||||
if (OSM.home) {
|
||||
marker.setLatLng([OSM.home.lat, OSM.home.lon]);
|
||||
|
@ -51,7 +51,7 @@ $(document).ready(function () {
|
|||
$("[data-user]").each(function () {
|
||||
var user = $(this).data('user');
|
||||
if (user.lon && user.lat) {
|
||||
L.marker([user.lat, user.lon], {icon: getUserIcon(user.icon)}).addTo(map)
|
||||
L.marker([user.lat, user.lon], {icon: OSM.getUserIcon(user.icon)}).addTo(map)
|
||||
.bindPopup(user.description);
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue