Clean up links, open links in new tab
This commit is contained in:
parent
9bdb4095a7
commit
806348e676
@ -5,6 +5,8 @@ var polyconf_show_street_names = 5; // Zoom level for when to start showing stre
|
||||
var polyconf_show_cities = 5; /* City outlines will be filled on this level and further away */
|
||||
var polyconf_show_districts = 4; /* Shown from polyconf_show_cities until this*/
|
||||
|
||||
var wikiurl_base = "https://wiki.linux-forks.de/mediawiki/index.php/"
|
||||
|
||||
var streetLabelsRenderer = new L.StreetLabels({
|
||||
collisionFlg: true,
|
||||
propertyName: 'name',
|
||||
@ -160,7 +162,7 @@ function load_tiles(name, id) {
|
||||
minNativeZoom: 0,
|
||||
minZoom: 0,
|
||||
noWrap: true,
|
||||
attribution: 'Map data © <a href="https://wiki.linux-forks.de/mediawiki/index.php/Maps">Linux-Forks</a>',
|
||||
attribution: 'Map data © <a href="' + wikiurl_base + 'Maps">Linux-Forks</a>',
|
||||
id: id,
|
||||
tileSize: 256,
|
||||
zoomOffset: 0,
|
||||
@ -204,7 +206,7 @@ function load_geojson(name, url, geotype, iconcolor, active=1, style={}) {
|
||||
default: /* else it is a marker with the specified icon */
|
||||
onEachFeature = function(feature, layer) {
|
||||
label = String(feature.properties.name)
|
||||
layer.bindPopup('<h1><a href="https://wiki.linux-forks.de/mediawiki/index.php/' + feature.properties.name + '">' + feature.properties.name + '</a> (' + feature.geometry.coordinates + ')</h1>' + '<p><img style="width:100%" src="' + feature.properties.image + '"></p>' + '<p>' + feature.properties.description + '</p>');
|
||||
layer.bindPopup('<h1><a target="_blank" href="' + wikiurl_base + feature.properties.name + '">' + feature.properties.name + '</a> (' + feature.geometry.coordinates + ')</h1>' + '<p><img style="width:100%" src="' + feature.properties.image + '"></p>' + '<p>' + feature.properties.description + '</p>');
|
||||
layer.bindTooltip(label, {
|
||||
permanent: true,
|
||||
direction: "center",
|
||||
@ -502,7 +504,7 @@ var baseballIcon = L.AwesomeMarkers.icon({
|
||||
function onMapClick(e) {
|
||||
var addinfo = "";
|
||||
if (current_location != "")
|
||||
addinfo = " (part of " + current_location + ")";
|
||||
addinfo = " (part of <a target=\"_blank\" href='" + wikiurl_base + current_location + "'>" + current_location + "</a>)";
|
||||
if (current_feature) {
|
||||
popup.setLatLng(e.latlng).setContent("This is " + current_feature.properties.name + addinfo).openOn(mymap);
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user