Greasy Fork is available in English.

WME Permalink to several Maps DACH

WME PTSM für Deutschland Österreich Schweiz

// ==UserScript==
// @name        WME Permalink to several Maps DACH
// @description WME PTSM für Deutschland Österreich Schweiz
// @namespace   https://greasyfork.org/de/users/863740-horst-wittlich
// @version     2024.08.25
// @match       https://*.waze.com/editor*
// @match       https://*.waze.com/*/editor*
// @match       https://beta.waze.com/editor*
// @match       https://beta.waze.com/*/editor*
// @icon        https://i.ibb.co/ckSvk59/waze-icon.png
// @grant       none
// @license     MIT
// ==/UserScript==
/* global OpenLayers */
/* global W */
/* global proj4 */
/* glo bal firstProj */
/* glo bal newtab */
var ptsmVersion = '2024.08.25'
// yyyy.mm.dd
/* eslint-env jquery */ // we are working with jQuery
// indicate used variables to be assigned

// currently not in use, but leaving code as a claculation reference
/*
double[] WGS84toGoogleBing(double lon, double lat) {
  double x = lon * 20037508.34 / 180;
  double y = Math.Log(Math.Tan((90 + lat) * Math.PI / 360)) / (Math.PI / 180);
  y = y * 20037508.34 / 180;
  return new double[] {x, y};
}

double[] GoogleBingtoWGS84Mercator (double x, double y) {
  double lon = (x / 20037508.34) * 180;
  double lat = (y / 20037508.34) * 180;

  lat = 180/Math.PI * (2 * Math.Atan(Math.Exp(lat * Math.PI / 180)) - Math.PI / 2);
  return new double[] {lon, lat};
}

function getQueryString(link, name) {
	var pos = link.indexOf(name + '=') + name.length + 1;
	var len = link.substr(pos).indexOf('&');
	if (-1 == len) len = link.substr(pos).length;
	return link.substr(pos, len);
}
*/

const ScriptName = GM_info.script.name;
const ScriptVersion = GM_info.script.version;

let ChangeLog = "WME Permalink to several Maps wurde Aktualisiert " + ScriptVersion + "<br />";
//ChangeLog = ChangeLog + "<br /><b>New: </b>";
//ChangeLog = ChangeLog + "<br />" + "- Added icon scaling so you can adjust the size of the icons";
ChangeLog = ChangeLog + "<br /><br /><b>Updated: </b>";
ChangeLog = ChangeLog + "<br />" + "- Neuer MTSC Button Archive";
ChangeLog = ChangeLog + "<br />" + "- Via Michelin Fix";

function getCenterZoom() {
	var map = W.map.getOLMap()
	var zoom = map.getZoom()
	var center = map.getCenter().transform(new OpenLayers.Projection('EPSG:900913'), new OpenLayers.Projection('EPSG:4326'))
	center.zoom = zoom
	return center
}

function addButtons() {
	if (document.getElementById('user-info') == null) {
		setTimeout(addButtons, 500)
		console.log('user-info element not yet available, page still loading')
		return
	}
	if (!W.loginManager.user) {
		W.loginManager.events.register('login', null, addButtons)
		W.loginManager.events.register('loginStatus', null, addButtons)
		// Double check as event might have triggered already
		if (!W.loginManager.user) {
			return
		}
	}
	if ("undefined" == typeof proj4) {
		// Using Proj4js to transform coordinates. See http://proj4js.org/
		var script = document.createElement('script') // dynamic load the library from https://cdnjs.com/libraries/proj4js
		script.type = 'text/javascript'
		script.src = 'https://cdnjs.cloudflare.com/ajax/libs/proj4js/2.4.4/proj4.js'
		document.getElementsByTagName('head')[0].appendChild(script) // Add it to the end of the head section of the page (could change 'head' to 'body' to add it to the end of the body section instead)
	}
	// Style sheet for buttons
	var style = document.createElement('style')
		style.type = 'text/css'
		style.append('#sidepanel-ptsm > div { margin-bottom: 1em; }')
		style.append('#sidepanel-ptsm button { color: inherit;text-align: left; padding-left: 22px; padding-right: 0; margin: 1.5%; width: 30%; height: 24px; font-size: 80%; background-repeat: no-repeat; border-radius: 7px; }')
		style.append('#sidepanel-ptsm .txtbtn { width: 96%;text-align: center;font-weight: bold;border: 1px solid silver;background-color: ghostwhite; }')
	document.getElementsByTagName('head')[0].appendChild(style)

	/*
	var btn0 = $('<button style="">ß-Switch</button>');
	btn0.click(function() {
		var mapsUrl;
		//    var href = $('.WazeControlPermalink a').attr('href');
		var href = document.getElementsByClassName('WazeControlPermalink')[0].getElementsByClassName('fa fa-link permalink')[0].href;
		var lon = getQueryString(href, 'lon');
		var lat = getQueryString(href, 'lat');
		var zoom = parseInt(getQueryString(href, 'zoom'));
		var newzoom = document.W.map.zoom;

		//   alert(href);
		var beta = href.indexOf('beta');
		if (beta >= 0) {
			//      mapsUrl = 'https://www.waze.com/editor/?lon=' + lon + '&lat=' + lat + '&zoom=' + (zoom-12);
			mapsUrl = href.replace('beta', 'www');
			//      alert("beta->www: " + mapsUrl);

		} else {
			//      mapsUrl = 'https://beta.waze.com/editor/?lon=' + lon + '&lat=' + lat + '&zoom=' + zoom;
			mapsUrl = href.replace('www', 'beta');
			//      alert("www->beta: " + mapsUrl);
		}
		window.open(mapsUrl);
	});
	*/

	var btn1 = $('<button style="background-image: url(https://bit.ly/3bltdQi);">Google</button>')
	btn1.click(() => {
		var cz = getCenterZoom()
		var mapsUrl = 'https://www.google.com/maps/@' + cz.lat + ',' + cz.lon + ',' + cz.zoom + 'z/data=!5m1!1e1'
		window.open(mapsUrl, '_blank');
	})

	var btn5 = $('<button style="background-image: url(https://i.ibb.co/WsH15zC/Apple-Jetzt.png);">Apple</button>')
	btn5.click(() => {
		var cz = getCenterZoom()
		var mapsUrl = 'https://beta.maps.apple.com/?ll=' + cz.lat + '%2C' + cz.lon + '/'
		window.open(mapsUrl, '_blank');
	})

	var btn2 = $('<button style="background-image: url(https://bit.ly/2ESClzU);">Bing</button>')
	btn2.click(() => {
		var cz = getCenterZoom()
		cz.zoom -= 1
		var mapsUrl = 'https://www.bing.com/maps/traffic?cp=' + cz.lat + '~' + cz.lon + '&lvl=' + cz.zoom
		window.open(mapsUrl, '_blank');
	})

	var btn3 = $('<button style="background-image: url(https://i.ibb.co/37q7H37/nrw.png);">Ver. NRW</button>')
	btn3.click(() => {
		var cz = getCenterZoom()
		var mapsUrl = 'https://www.verkehr.nrw/?center=' + cz.lat + ',' + cz.lon + '&zoom=' + cz.zoom + '&car=true&publicTransport=true&bike=true&layer=Verkehrslage,Haltestellen,Parken,Webcams,Verkehrsmeldungen,Baustellen,Luftbild,ELadesaeulen,Tankstellen&highlightRoute=false'
		window.open(mapsUrl, '_blank');
	})

	var btn3a = $('<button style="background-image: url(https://bit.ly/3jCiB2j);">OSM</button>')
	btn3a.click(() => {
		var cz = getCenterZoom()
		var mapsUrl = 'http://www.openstreetmap.org/#map=' + cz.zoom + '/' + cz.lat + '/' + cz.lon
		window.open(mapsUrl, '_blank');
	})

	var btn3b = $('<button style="color: Crimson">OSM/bing</button>')
	btn3b.click(() => {
		var cz = getCenterZoom()
		var mapsUrl = 'http://mvexel.dev.openstreetmap.org/bingimageanalyzer/?lat=' + cz.lat + '&lon=' + cz.lon + '&zoom=' + cz.zoom
		window.open(mapsUrl, '_blank');
	})

	// http://www.viamichelin.de/print/map?latitude=48.2638198&longitude=16.423198&zoom=16&address=&departure&arrival
	var btn9 = $('<button style="background-image: url(https://bit.ly/3hSLI0O);">ViaM</button>')
	btn9.click(() => {
		var cz = getCenterZoom()
		cz.zoom -= 1
        var mapsUrl = 'https://www.viamichelin.de/karten-stadtplan/verkehr?bounds=' + cz.lon*1.0001 + '~' + cz.lat*1.0001 + '~' + cz.lon *0.9999 + '~' + cz.lat*0.9999 + '&center=' + cz.lon + '~' +cz.lat+ '&detailedView=true&itinerary=&page=1&poiCategories=0'
        window.open(mapsUrl, '_blank');
	})

	// https://wego.here.com/traffic/explore?map=51.44015,7.06547,12,satellite_traffic
	var btn10 = $('<button style="background-image: url(https://i.ibb.co/MC9JF7T/h-logo.png);">Here</button>')
	btn10.click(() => {
		var cz = getCenterZoom()
		var mapsUrl = 'https://wego.here.com/traffic/explore?map=' + cz.lat + ',' + cz.lon + ',' + cz.zoom + ',traffic'
		window.open(mapsUrl, '_blank');
	})

	var btn95 = $('<button style="background-image: url(http://rf.revolvermaps.com/w/3/s/a/0/20/2/ffffff/010020/aa0000/5d8h9swr38l.png);">Stats</button>')
	btn95.click(() => {
		var mapsUrl = 'https://www.revolvermaps.com/livestats/5d8h9swr38l/'
		window.open(mapsUrl, '_blank');
	})

	// https://www.mapillary.com/app/?lat=49.97940953634415&lng=9.127301585621836&z=14.19223566766781&focus=map
	var btn11 = $('<button style="background-image: url(https://bit.ly/2DlCYBo);">Mapillary</button>')
	btn11.click(() => {
		var cz = getCenterZoom()
		cz.zoom = 0.991 * cz.zoom - 1.0997
		var mapsUrl = 'https://www.mapillary.com/app/?lat=' + cz.lat + '&lng=' + cz.lon + '&z=' + cz.zoom
		window.open(mapsUrl, '_blank');
	})

	// https://www.openstreetbrowser.org/#map=18/51.18321/6.71228&categories=car_maxspeed
	var btn12 = $('<button style="background-image: url(https://bit.ly/2Gfre4s);">OSBrowser</button>')
	btn12.click(() => {
		var cz = getCenterZoom()
		var mapsUrl = 'https://www.openstreetbrowser.org/#map=' + cz.zoom + '/' + cz.lat + '/' + cz.lon + '&categories=car_maxspeed'
		window.open(mapsUrl, '_blank');
	})

	// https://en.mappy.com/#/12/M2/THome/N0,0,15.69021,48.4738/Z19/	does not work
	// https://en.mappy.com/plan#/51.52085,7.47023				no zoom syntax found
	var btn13 = $('<button style="background-image: url(https://bit.ly/2EVea3B);">Mappy</button>')
	btn13.click(() => {
		var cz = getCenterZoom()
		var mapsUrl = 'https://en.mappy.com/plan#/' + cz.lat + ',' + cz.lon
		window.open(mapsUrl, '_blank');
	})

	// https://map.atudo.com/v4/?lat=52.1548982153146&lng=10.4580277141803&zoom=30
	var btn14 = $('<button style="background-image: url(https://i.ibb.co/gVKMwKS/blitzer.png);">Blitzer.de</button>')
	btn14.click(() => {
		var cz = getCenterZoom()
		var mapsUrl = 'https://map.atudo.com/v4/?lat=' + cz.lat + '&lng=' + cz.lon + '&zoom=' + cz.zoom
		window.open(mapsUrl, '_blank');
	})

	// https://www.msn.com/de-de/traffic?locale=de-de&cp=51.23013,%206.82414&lvl=19&sty=h
	var btn15 = $('<button style="background-image: url(https://i.ibb.co/zsMRVGB/Microsoft-23401-20.png);">MSN</button>')
	btn15.click(() => {
		var cz = getCenterZoom()
		var mapsUrl = 'https://www.msn.com/de-de/traffic?locale=de-de&cp=' + cz.lat + ',%20' + cz.lon + '&lvl=' + cz.zoom
		window.open(mapsUrl, '_blank');
	})

	// https://geoportal.bayern.de/bayernatlas/index.html?zoom=9&lang=de&topic=ba&bgLayer=atkis&catalogNodes=11,122&E=639436.74&N=5324591.68
	var btn16 = $('<button style="background-image: url(https://bit.ly/2YXn1sK);">BY Atlas</button>')
	btn16.click(() => {
		var cz = getCenterZoom()
		cz.zoom -= 5

		if (!proj4) {
			console.log('proj4 not loaded :-(')
			return
		}

		var firstProj = '+proj=utm +zone=32 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs'
		var utm = proj4(firstProj, [cz.lon, cz.lat])
		var mapsUrl = 'https://geoportal.bayern.de/bayernatlas/index.html?zoom=' + cz.zoom + '&E=' + utm[0] + '&N=' + utm[1]
		window.open(mapsUrl, '_blank');
	})

	// http://frink.bplaced.de/blitzer/#map=11/51.9026/10.5036
	var btn17 = $('<button style="background-image: url(https://bit.ly/2QNtBha);">OSM Blitzer</button>')
	btn17.click(() => {
		var cz = getCenterZoom()
		var mapsUrl = 'http://frink.bplaced.de/blitzer/#map=' + cz.zoom + '/' + cz.lat + '/' + cz.lon
		window.open(mapsUrl, '_blank');
	})

	// https://mydrive.tomtom.com/de_de/#mode=viewport+viewport=49.76137,9.70753,15,0,-0+ver=3
	var btn18 = $('<button style="background-image: url(https://i.ibb.co/hDq5bys/tomtom-icon2.png);">TomTom</button>')
	btn18.click(() => {
		var cz = getCenterZoom()
		cz.zoom -= 1
		var mapsUrl = 'https://plan.tomtom.com/de?p=' + cz.lat + ',' + cz.lon + ',' + cz.zoom + 'z'
		window.open(mapsUrl, '_blank');
	})

	var btn19 = $('<button style="background-image: url(https://i.ibb.co/V3jJJrb/de-map.png);">Basemap.de</button>')
	btn19.click(() => {
		var cz = getCenterZoom()
		cz.zoom = 0.985 * cz.zoom - 1.05
		var mapsUrl = 'https://basemap.de/viewer?config=' + btoa('{"lat":' + cz.lat + ',"lon":' + cz.lon + ',"zoom":' + cz.zoom + ',"styleID":0,"pitch":0,"bearing":0,"saturation":0,"brightness":0,"hiddenControls":[],"hiddenLayers":[],"changedLayers":[],"hiddenSubGroups":[],"changedSubGroups":[],"externalStyleURL":""}')
		window.open(mapsUrl, '_blank');
	})

	// Waze Reportingtool: https://www.waze.com/reporting/location?lat=49.50939698036761&lng=6.743288040161134&zoom=16
	var btn20 = $('<button style="background-image: url(https://i.ibb.co/rZb76j2/pin.png);">Reporting</button>')
	btn20.click(() => {
		var cz = getCenterZoom()
		cz.zoom -= 1
		var mapsUrl = 'https://www.waze.com/partnerhub/map-tool?lat=' + cz.lat + '&lon=' + cz.lon + '&zoom=' + cz.zoom
		window.open(mapsUrl, '_blank');
	})

	// https://kartaview.org/map/@48.110432829485546,11.527876853942873,16z
	var btn21 = $('<button style="background-image: url(https://i.ibb.co/xgnTMFf/kartaview.png);">KartaView</button>')
	btn21.click(() => {
		var cz = getCenterZoom()
		cz.zoom -= 1
		var mapsUrl = 'https://kartaview.org/map/@' + cz.lat + ',' + cz.lon + ',' + cz.zoom + 'z'
		window.open(mapsUrl, '_blank');
	})

	// https://bayerninfo.de/de/baustellenkalender?geo=48.084776,11.196357&zoom=16
	var btn22 = $('<button style="background-image: url(https://i.ibb.co/R0K3SSs/bayerninfo.png);">Bayerninfo</button>')
	btn22.click(() => {
		var cz = getCenterZoom()
		cz.zoom -= 2

		var now = new Date()
		var then = new Date()
		then.setDate(then.getDate() + 60)

		let mapsUrl = 'https://www.bayerninfo.de/de/baustellenkalender?geo=' + cz.lat + ',' + cz.lon + '&zoom=' + cz.zoom
		mapsUrl = mapsUrl + '&datetimeFrom=' + now.toISOString() + '&datetimeTo=' + then.toISOString()
		window.open(mapsUrl, '_blank');
	})

	var btn30 = $('<button style="background-image: url(https://i.ibb.co/bPJ4qRy/das-da2.png);">TimOnline</button>')
	btn30.click(() => {
		var cz = getCenterZoom()
		cz.zoom = 454959671.96858*Math.exp(-0.693*cz.zoom)
		var mapsUrl = 'https://www.tim-online.nrw.de/tim-online2/?center=' + cz.lat + ',' + cz.lon + '&scale=' + cz.zoom
		window.open(mapsUrl, '_blank');
	})

	var btn31 = $('<button style="background-image: url(https://i.ibb.co/Np5chv4/CH-Icon-20.png);">GeoAdmin</button>')
	btn31.click(() => {
		var cz = getCenterZoom()
		cz.zoom -= 7.2
		var phi1 = ((cz.lat * 3600) - 169028.66) / 10000
		var lmd1 = ((cz.lon * 3600) - 26782.5) / 10000
		var x = 200147.07 + 308807.95 * phi1 + 3745.25 * lmd1 * lmd1 + 76.63 * phi1 * phi1 + 119.79 * phi1 * phi1 * phi1 - 194.56 * lmd1 * lmd1 * phi1
		var y = 600072.37 + 211455.93 * lmd1 - 10938.51 * lmd1 * phi1 - 0.36 * lmd1 * phi1 * phi1 - 44.54 * lmd1 * lmd1 * lmd1
        var mapsUrl = 'https://map.geo.admin.ch/?Y=' + y.toFixed(0) + '&X=' + x.toFixed(0) + '&zoom=' + cz.zoom + '&topic=ech&lang=de&bgLayer=ch.swisstopo.pixelkarte-farbe&layers=ch.bfs.gebaeude_wohnungs_register,ch.kantone.cadastralwebmap-farbe,ch.swisstopo.swissimage-product,ch.bfe.ladestellen-elektromobilitaet&catalogNodes=457,532,687,458,477,485,491,510,527,1743&layers_visibility=false,false,true,true&layers_timestamp=,,current';
    window.open(mapsUrl,'_blank');
});

	var btn32 = $('<button style="background-image: url(https://i.ibb.co/MCKhDSH/AT-Icon.png);">Basemap</button>')
	btn32.click(() => {
		var cz = getCenterZoom()
		var x = cz.lon / 180 * 20037508.34
		let y = Math.log(Math.tan((90 + cz.lat * 1) * Math.PI / 360)) / Math.PI
		y *= 20037508.34
		var mapsUrl = 'https://basemap.at/bmapp/index.html#{"center":[' + x.toFixed(10) + ',' + y.toFixed(10) + '],"zoom":' + cz.zoom + ',"rotation":0,"layers":"1000000000"}'
		window.open(mapsUrl, '_blank');
	})

	var btn33 = $('<button style="background-image: url(https://i.ibb.co/bsQby3H/favicon20x20.png);">Flitsmeister</button>')
	btn33.click(() => {
		var cz = getCenterZoom()
		cz.zoom -= 1
		var mapsUrl = 'https://atlas.be-mobile.biz/?config=5ddd1adc6e70042b20b6e405&language.language=de_DE&futureEvents=true&tmcBasedEvents=true&@=map_' + cz.lat + ',' + cz.lon + ',' + cz.zoom
		window.open(mapsUrl, '_blank');
	})

	var btn34 = $('<button style="background-image: url(https://i.ibb.co/6YsGCFy/adac.png);">ADAC</button>')
	btn34.click(() => {
		var cz = getCenterZoom()
		var mapsUrl = 'https://maps.adac.de/show?place=' + cz.lat + '_' + cz.lon + '_2&traffic=announcements%2Cconstruction%2Cflow'
		window.open(mapsUrl, '_blank');
	})

	var btn36 = $('<button style="background-image: url(https://i.ibb.co/VghMgy8/here.png);">Here Edit</button>')
	btn36.click(() => {
		var cz = getCenterZoom()
		var mapsUrl = 'https://mapcreator.here.com/?l=' + cz.lat + ',' + cz.lon + ',' + cz.zoom + ',autoselect'
		window.open(mapsUrl, '_blank');
	})

var btn37 = $('<button style="background-image: url(https://i.ibb.co/XYqjkYX/umsehen-icon.png);">Umsehen</button>')
    btn37.click(() => {
        var cz = getCenterZoom()
        cz.zoom += 1.0
        var mapsUrl = 'https://maps.apple.com/?ll=' + cz.lat + ',' + cz.lon + '&z=' + cz.zoom + '&t=m'
        window.open(mapsUrl, '_blank');
    })

	var btn38 = $('<button style="background-image: url(https://i.ibb.co/QP7RdLT/DOP-Logo2.png);">DOP Viewer</button>');
	btn38.click(function(){
		var cz = getCenterZoom()
		cz.zoom -= 3
		var mapsUrl = 'https://sg.geodatenzentrum.de/dop_viewer/viewer.html#lat=';
		window.open(mapsUrl,'_blank');
    })

	var btn39 = $('<button style="background-image: url(https://i.ibb.co/8xP5RyC/Hackintosh.png);">Hackintosh</button>')
	btn39.click(() => {
		var cz = getCenterZoom()
		var mapsUrl = 'https://lookmap.eu.pythonanywhere.com/#c=' + cz.zoom + '/' + cz.lat + '/' + cz.lon + '/'
		window.open(mapsUrl, '_blank');
	})

	var btn40 = $('<button style="background-image: url(https://i.ibb.co/QHpvd85/Das-Logo.png);">Archive</button>');
	btn40.click(function(){
		var mapsUrl = 'https://archive.is/';
		window.open(mapsUrl,'_blank');
	});

	// alert("Create Tab");
	let userTabs = document.getElementById('user-info')
	let navTabs = document.getElementsByClassName('nav-tabs', userTabs)[0]
	let tabContent = document.getElementsByClassName('tab-content', userTabs)[0]
	let newtab = ''

	newtab = document.createElement('li')
	newtab.innerHTML = '<a href="#sidepanel-ptsm" data-toggle="tab">PTSM</a>'
	navTabs.appendChild(newtab)

	// add new box to left of the map
	let addon = document.createElement('section')
	addon.id = 'sidepanel-ptsm'
	addon.className = 'tab-pane'
	tabContent.appendChild(addon)

	let divInfo  	= $('<div id="ptsm-Info"></div>')
	let divAllgem 	= $('<div id="ptsm-Allgem" style="color: DarkSlateGrey;"></div>')
	let divBaustell	= $('<div id="ptsm-Baustell" style="color: #0E6251;"></div>')
	let divBlitzer 	= $('<div id="ptsm-Blitzer" style="color: DarkCyan;"></div>')
	let divBilder 	= $('<div id="ptsm-Bilder" style="color: DarkGreen;"></div>')
	let divGeoPort 	= $('<div id="ptsm-GeoPort" style="color: CornflowerBlue;"></div>')
	let divMisc 	= $('<div id="ptsm-Misc" style="color: LightSeaGreen;"></div>')

	let txtinfo = $('<a href="https://greasyfork.org/de/scripts/448378-wme-permalink-to-several-maps-dach" target="_blank">Auf Updates überprüfen / V' + ptsmVersion + '</a>')
	let txtbtn1 = $('<button class="txtbtn">ALLGEMEINE KARTEN</button>')
	let txtbtn2 = $('<button class="txtbtn">BLITZER</button>')
	let txtbtn3 = $('<button class="txtbtn">GESCHWINDIGKEITEN / BILDER</button>')
	let txtbtn4 = $('<button class="txtbtn">GEOPORTALE</button>')
	let txtbtn5 = $('<button class="txtbtn">MISC</button>')
	let txtbtn6 = $('<button class="txtbtn"">BAUSTELLEN</button>')
	let safeSourcesText = $('<div><i class="w-icon w-icon-warning" style="font-size: 30px;float: left;margin-right: 50x;margin-bottom: 20px;"></i> Hinweis: Einige der externen Karten sind als Informationsquelle zur Kartenbearbeitung nicht zulässig!</div>')

	$('#sidepanel-ptsm').append(divInfo)
	divInfo.append(txtinfo)

	$('#sidepanel-ptsm').append(divAllgem)
	divAllgem.append(txtbtn1) // ¦¦¦¦¦ "ALLGEMEINE KARTEN" ¦¦¦¦¦
	divAllgem.append(btn1) // GOOGLE
	divAllgem.append(btn2) // BING
	divAllgem.append(btn3a) // OSM
	divAllgem.append(btn9) // VIAM
	divAllgem.append(btn10) // HERE
	divAllgem.append(btn13) // MAPPY
	divAllgem.append(btn18) // TOMTOM
	divAllgem.append(btn5) // Apple
	divAllgem.append(btn38) // DOP Viewer

	$('#sidepanel-ptsm').append(divBaustell)
	divBaustell.append(txtbtn6) //  ¦¦¦¦¦ "BAUSTELLEN" ¦¦¦¦¦
	divBaustell.append(btn34) // ADAC
	divBaustell.append(btn15) // MSN
	divBaustell.append(btn3) // Verkehr NRW

	$('#sidepanel-ptsm').append(divBlitzer)
	divBlitzer.append(txtbtn2) //  ¦¦¦¦¦ "BLITZER" ¦¦¦¦¦
	divBlitzer.append(btn14) // Blitzer.de
	divBlitzer.append(btn17) // OSM BLITZER

	$('#sidepanel-ptsm').append(divBilder)
	divBilder.append(txtbtn3) // ¦¦¦¦¦ "GESCHWINDIGKEITEN / BILDER" ¦¦¦¦¦
	divBilder.append(btn11) // MAPILLARY
	divBilder.append(btn21) // KARTAVIEW
	divBilder.append(btn12) // OSBROWSER

	$('#sidepanel-ptsm').append(divGeoPort)
	divGeoPort.append(txtbtn4) // ¦¦¦¦¦ "GEOPORTALE" ¦¦¦¦¦
	divGeoPort.append(btn19) // WEBATLAS
	divGeoPort.append(btn32) // Basemap.at
	divGeoPort.append(btn31) // GEOADMIN
	divGeoPort.append(btn30) // TIM
	divGeoPort.append(btn16) // BAYERNATLAS
	divGeoPort.append(btn22) // BAYERNINFO

	$('#sidepanel-ptsm').append(divMisc)
	divMisc.append(txtbtn5) // ¦¦¦¦¦ "Misc" ¦¦¦¦¦
	divMisc.append(btn20) // Waze Report
	divMisc.append(btn36) // Here Editor
	divMisc.append(btn37) // Apple Umsehen
	divMisc.append(btn39) // Appetize Emulator
	divMisc.append(btn40) // Archive.is
	divMisc.append(btn95) // STATS

	$('#sidepanel-ptsm').append(safeSourcesText)
}

addButtons()