Merge map.js.erb and leaflet.extend.js.erb
This commit is contained in:
parent
e4504399ae
commit
14136b27c2
4 changed files with 14 additions and 14 deletions
|
@ -10,13 +10,12 @@
|
|||
//= require leaflet
|
||||
//= require leaflet.osm
|
||||
//= require leaflet.hash
|
||||
//= require leaflet.map
|
||||
//= require leaflet.zoom
|
||||
//= require leaflet.extend
|
||||
//= require leaflet.locationfilter
|
||||
//= require i18n/translations
|
||||
//= require oauth
|
||||
//= require piwik
|
||||
//= require map
|
||||
//= require richtext
|
||||
//= require querystring
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
$(document).ready(function () {
|
||||
var params = OSM.mapParams();
|
||||
|
||||
var map = L.map("map", {
|
||||
var map = new L.OSM.Map("map", {
|
||||
zoomControl: false,
|
||||
layerControl: false
|
||||
});
|
||||
|
|
|
@ -9,7 +9,7 @@ L.extend(L.LatLngBounds.prototype, {
|
|||
}
|
||||
});
|
||||
|
||||
L.extend(L.Map.prototype, {
|
||||
L.OSM.Map = L.Map.extend({
|
||||
getLayersCode: function () {
|
||||
var layerConfig = '';
|
||||
for (var i in this._layers) { // TODO: map.eachLayer
|
||||
|
@ -183,3 +183,14 @@ L.extend(L.Icon.Default.prototype, {
|
|||
|
||||
L.Hash.prototype.parseHash = OSM.parseHash;
|
||||
L.Hash.prototype.formatHash = OSM.formatHash;
|
||||
|
||||
function getUserIcon(url) {
|
||||
return L.icon({
|
||||
iconUrl: url || <%= asset_path('marker-red.png').to_json %>,
|
||||
iconSize: [25, 41],
|
||||
iconAnchor: [12, 41],
|
||||
popupAnchor: [1, -34],
|
||||
shadowUrl: <%= asset_path('images/marker-shadow.png').to_json %>,
|
||||
shadowSize: [41, 41]
|
||||
});
|
||||
}
|
|
@ -1,10 +0,0 @@
|
|||
function getUserIcon(url) {
|
||||
return L.icon({
|
||||
iconUrl: url || <%= asset_path('marker-red.png').to_json %>,
|
||||
iconSize: [25, 41],
|
||||
iconAnchor: [12, 41],
|
||||
popupAnchor: [1, -34],
|
||||
shadowUrl: <%= asset_path('images/marker-shadow.png').to_json %>,
|
||||
shadowSize: [41, 41]
|
||||
});
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue