PageSourceSearch

https://waldeier.de/files/Standardlayout/openstreetmap/tom.js

js waldeier.de collected 2026-10-07 04:17:05 UTC 1,902 bytes, 63 lines download raw bytes

1function jumpTo(lon, lat, zoom) {
2    var x = Lon2Merc(lon);
3    var y = Lat2Merc(lat);
4    map.setCenter(new OpenLayers.LonLat(x, y), zoom);
5    return false;
6}
7
8function Lon2Merc(lon) {
9    return 20037508.34 * lon / 180;
10}
11
12function Lat2Merc(lat) {
13    var PI = 3.14159265358979323846;
14    lat = Math.log(Math.tan( (90 + lat) * PI / 360)) / (PI / 180);
15    return 20037508.34 * lat / 180;
16}
17
18function addMarker(layer, lon, lat, popupContentHTML) {
19
20    var ll = new OpenLayers.LonLat(Lon2Merc(lon), Lat2Merc(lat));
21    var feature = new OpenLayers.Feature(layer, ll); 
22    feature.closeBox = true;
23    feature.popupClass = OpenLayers.Class(OpenLayers.Popup.FramedCloud, {minSize: new OpenLayers.Size(300, 180) } );
24    feature.data.popupContentHTML = popupContentHTML;
25    feature.data.overflow = "hidden";
26            
27    var marker = new OpenLayers.Marker(ll);
28    marker.feature = feature;
29
30    var markerClick = function(evt) {
31        if (this.popup == null) {
32            this.popup = this.createPopup(this.closeBox);
33            map.addPopup(this.popup);
34            this.popup.show();
35        } else {
36            this.popup.toggle();
37        }
38        OpenLayers.Event.stop(evt);
39    };
40    marker.events.register("mousedown", feature, markerClick);
41
42    layer.addMarker(marker);
43    map.addPopup(feature.createPopup(feature.closeBox));
44}
45
46function getCycleTileURL(bounds) {
47   var res = this.map.getResolution();
48   var x = Math.round((bounds.left - this.maxExtent.left) / (res * this.tileSize.w));
49   var y = Math.round((this.maxExtent.top - bounds.top) / (res * this.tileSize.h));
50   var z = this.map.getZoom();
51   var limit = Math.pow(2, z);
52
53   if (y < 0 || y >= limit)
54   {
55     return null;
56   }
57   else
58   {
59     x = ((x % limit) + limit) % limit;
60
61     return this.url + z + "/" + x + "/" + y + "." + this.type;
62   }
63}

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.