if (data.info.statuscode !== 0)
return callback(true);
+ var i;
var line = [];
var shape = data.route.shape.shapePoints;
- for (var i = 0; i < shape.length; i += 2) {
+ for (i = 0; i < shape.length; i += 2) {
line.push(L.latLng(shape[i], shape[i + 1]));
}
// data.route.legs[0].maneuvers is list of turns
var steps = [];
var mq = data.route.legs[0].maneuvers;
- for (var i = 0; i < mq.length; i++) {
+ for (i = 0; i < mq.length; i++) {
var s = mq[i];
var d;
var linesegstart, linesegend, lineseg;
OSM.Note = function (map) {
- var noteLayer = map.noteLayer,
- content = $('#sidebar_content'),
+ var content = $('#sidebar_content'),
page = {},
halo, currentNote;
});
} else {
var prefixes = I18n.t("geocoder.search_osm_nominatim.prefix");
+ var key, value;
- for (var key in tags) {
- var value = tags[key];
+ for (key in tags) {
+ value = tags[key];
if (prefixes[key]) {
if (prefixes[key][value]) {
}
}
- for (var key in tags) {
- var value = tags[key];
+ for (key in tags) {
+ value = tags[key];
if (prefixes[key]) {
var first = value.substr(0, 1).toUpperCase(),
.attr('class', 'section base-layers')
.appendTo($ui);
- list = $('<ul>')
+ var baseLayers = $('<ul>')
.appendTo(baseSection);
layers.forEach(function(layer) {
var item = $('<li>')
- .appendTo(list);
+ .appendTo(baseLayers);
if (map.hasLayer(layer)) {
item.addClass('active');
.attr("class", "deemphasize")
.appendTo(overlaySection);
- var list = $('<ul>')
+ var overlays = $('<ul>')
.appendTo(overlaySection);
var addOverlay = function (layer, name, maxArea) {
.tooltip({
placement: 'top'
})
- .appendTo(list);
+ .appendTo(overlays);
var label = $('<label>')
.appendTo(item);
link.href = '#';
link.title = title;
- var sprite = L.DomUtil.create('span', 'icon ' + className, link);
+ L.DomUtil.create('span', 'icon ' + className, link);
var stop = L.DomEvent.stopPropagation;
unused: true
trailing: true
globals:
- I18n: true
+ I18n: false
L: true
OSM: true
- Piwik: true
+ Piwik: false
+ alert: false
+ escape: false
maximiseMap: false
minimiseMap: false
- querystring: false
+ querystring: true
+ require: false
updateLinks: false