PageSourceSearch

https://cloud.dstar.su/maps/StationTools.js

js dstar.su collected 2026-10-04 02:22:53 UTC 644 bytes, 30 lines download raw bytes

1// StationTools.js
2// Copyright 2012 Artem Prilutskiy
3
4function queryStationPosition(call, handler)
5{
6  $.getJSON('https://tracker.dstar.su/api/location.php?callback=?',
7    { 'call': call },
8    handler
9  );
10}
11
12function locatePosition(data, map)
13{
14  if ((data['position'] != undefined))
15  {
16    var coordinates = new OpenLayers.LonLat(data['position'][0], data['position'][1]).transform(
17      new OpenLayers.Projection('EPSG:4326'), map.projection);
18    map.setCenter(coordinates, 12, false, false);
19  }
20}
21
22function locateStation(call, map)
23{
24  queryStationPosition(call,
25    function(data)
26    {
27      locatePosition(data, map);
28    }
29  );
30}

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.