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
|
||||||
//= require leaflet.osm
|
//= require leaflet.osm
|
||||||
//= require leaflet.hash
|
//= require leaflet.hash
|
||||||
|
//= require leaflet.map
|
||||||
//= require leaflet.zoom
|
//= require leaflet.zoom
|
||||||
//= require leaflet.extend
|
|
||||||
//= require leaflet.locationfilter
|
//= require leaflet.locationfilter
|
||||||
//= require i18n/translations
|
//= require i18n/translations
|
||||||
//= require oauth
|
//= require oauth
|
||||||
//= require piwik
|
//= require piwik
|
||||||
//= require map
|
|
||||||
//= require richtext
|
//= require richtext
|
||||||
//= require querystring
|
//= require querystring
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
var params = OSM.mapParams();
|
var params = OSM.mapParams();
|
||||||
|
|
||||||
var map = L.map("map", {
|
var map = new L.OSM.Map("map", {
|
||||||
zoomControl: false,
|
zoomControl: false,
|
||||||
layerControl: 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 () {
|
getLayersCode: function () {
|
||||||
var layerConfig = '';
|
var layerConfig = '';
|
||||||
for (var i in this._layers) { // TODO: map.eachLayer
|
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.parseHash = OSM.parseHash;
|
||||||
L.Hash.prototype.formatHash = OSM.formatHash;
|
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