Rename map layer javascript files
This commit is contained in:
parent
ecd091c976
commit
51d2a846ec
3 changed files with 9 additions and 9 deletions
|
@ -12,9 +12,9 @@
|
|||
//= require leaflet.contextmenu
|
||||
//= require index/contextmenu
|
||||
//= require index/search
|
||||
//= require index/browse
|
||||
//= require index/layers/data
|
||||
//= require index/export
|
||||
//= require index/notes
|
||||
//= require index/layers/notes
|
||||
//= require index/history
|
||||
//= require index/note
|
||||
//= require index/new_note
|
||||
|
@ -160,12 +160,12 @@ $(document).ready(function () {
|
|||
OSM.initializeContextMenu(map);
|
||||
|
||||
if (OSM.STATUS !== "api_offline" && OSM.STATUS !== "database_offline") {
|
||||
OSM.initializeNotes(map);
|
||||
OSM.initializeNotesLayer(map);
|
||||
if (params.layers.indexOf(map.noteLayer.options.code) >= 0) {
|
||||
map.addLayer(map.noteLayer);
|
||||
}
|
||||
|
||||
OSM.initializeBrowse(map);
|
||||
OSM.initializeDataLayer(map);
|
||||
if (params.layers.indexOf(map.dataLayer.options.code) >= 0) {
|
||||
map.addLayer(map.dataLayer);
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
OSM.initializeBrowse = function (map) {
|
||||
var browseBounds;
|
||||
OSM.initializeDataLayer = function (map) {
|
||||
var loadedBounds;
|
||||
var dataLayer = map.dataLayer;
|
||||
|
||||
dataLayer.setStyle({
|
||||
|
@ -41,7 +41,7 @@ OSM.initializeBrowse = function (map) {
|
|||
|
||||
function updateData() {
|
||||
var bounds = map.getBounds();
|
||||
if (!browseBounds || !browseBounds.contains(bounds)) {
|
||||
if (!loadedBounds || !loadedBounds.contains(bounds)) {
|
||||
getData();
|
||||
}
|
||||
}
|
||||
|
@ -96,7 +96,7 @@ OSM.initializeBrowse = function (map) {
|
|||
function addFeatures() {
|
||||
$("#browse_status").empty();
|
||||
dataLayer.addData(features);
|
||||
browseBounds = bounds;
|
||||
loadedBounds = bounds;
|
||||
}
|
||||
|
||||
function cancelAddFeatures() {
|
|
@ -1,4 +1,4 @@
|
|||
OSM.initializeNotes = function (map) {
|
||||
OSM.initializeNotesLayer = function (map) {
|
||||
var noteLayer = map.noteLayer,
|
||||
notes = {};
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue