File: mytopo.js

package info (click to toggle)
php-horde-core 2.15.0%2Bdebian0-1%2Bdeb8u1
  • links: PTS, VCS
  • area: main
  • in suites: jessie
  • size: 7,396 kB
  • ctags: 5,941
  • sloc: php: 24,591; xml: 3,488; sh: 14; makefile: 14
file content (29 lines) | stat: -rw-r--r-- 993 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
  /**
 * Mytopo layer. See http://www.mytopo.com/google/index.cfm for instructions
 * in obtaining an api key.
 *
 * Copyright 2009-2014 Horde LLC (http://www.horde.org/)
 *
 * See the enclosed file COPYING for license information (GPL). If you
 * did not receive this file, see http://www.fsf.org/copyleft/gpl.html.
 *
 * @author Michael J. Rubinsky <mrubinsk@horde.org>
 *
 */
HordeMap.Mytopo = Class.create(
{
    initialize: function(opts)
    {
        this._id = HordeMap.conf.apikeys.mytopo.id;
        this._hash = HordeMap.conf.apikeys.mytopo.hash;
    },

    getLayers: function(layer)
    {
        return {'street': new OpenLayers.Layer.XYZ("MyTopo Topographic Map",
                    ['http://tileserver.mytopo.com/SecureTile/TileHandler.ashx?mapType=Topo&partnerID=' + this._id + '&hash=' + this._hash + '&x=${x}&y=${y}&z=${z}'],
                     {'sphericalMercator': true,
                      'minZoomLevel': 2,
                      'numZoomLevels': 17}) };
    }
});