File: cloudmade.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 (32 lines) | stat: -rw-r--r-- 1,212 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
30
31
32
/**
 * Default layers from various public, open, APIs.  This file can also be
 * used as a template for creating layers and geocoding services from your
 * own hosted WMS or geocoding service.
 *
 * 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.horde.org/licenses/gpl.
 *
 * @author Michael J. Rubinsky <mrubinsk@horde.org>
 *
 */
HordeMap.Cloudmade = Class.create(
{
    initialize: function(opts)
    {
        this._key = HordeMap.conf.apikeys.cloudmade;
        this._style = 1;
    },

    getLayers: function(layer)
    {
        return {'street': new OpenLayers.Layer.XYZ("CloudMade Street",
                    ['http://a.tile.cloudmade.com/' + this._key + '/' + this._style + '/256/${z}/${x}/${y}.png',
                     'http://b.tile.cloudmade.com/' + this._key + '/' + this._style + '/256/${z}/${x}/${y}.png',
                     'http://c.tile.cloudmade.com/' + this._key + '/' + this._style + '/256/${z}/${x}/${y}.png'],
                     {'sphericalMercator': true,
                      'minZoomLevel': 2,
                      'numZoomLevels': 17}) };
    }
});