forked from dboune/stormrets-maps
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathagentstorm.js
46 lines (46 loc) · 2.12 KB
/
agentstorm.js
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
OpenLayers.Layer.AgentStorm = OpenLayers.Class(OpenLayers.Layer.XYZ, {
initialize: function(name, options) {
options = OpenLayers.Util.extend({
attribution: "Data © 2009 <a href='http://openstreetmap.org/'>OpenStreetMap</a>. Rendering © 2010 <a href='http://www.agentstorm.com'>Agent Storm</a>.",
maxExtent: new OpenLayers.Bounds(-20037508.34,-20037508.34,20037508.34,20037508.34),
maxResolution: 156543.0339,
units: "m",
projection: "EPSG:900913",
isBaseLayer: true,
numZoomLevels: 19,
displayOutsideMaxExtent: true,
wrapDateLine: true,
}, options);
var url = [
"http://a.maps.agentstorm.com/tiles/${z}/${x}/${y}.png",
"http://b.maps.agentstorm.com/tiles/${z}/${x}/${y}.png",
"http://c.maps.agentstorm.com/tiles/${z}/${x}/${y}.png"
];
var newArguments = [name, url, options];
OpenLayers.Layer.XYZ.prototype.initialize.apply(this, newArguments);
},
CLASS_NAME: "OpenLayers.Layer.AgentStorm"
});
OpenLayers.Layer.AgentStormTransit = OpenLayers.Class(OpenLayers.Layer.XYZ, {
initialize: function(name, options) {
options = OpenLayers.Util.extend({
attribution: "Data © 2009 <a href='http://openstreetmap.org/'>OpenStreetMap</a>. Rendering © 2010 <a href='http://www.agentstorm.com'>Agent Storm</a>.",
maxExtent: new OpenLayers.Bounds(-20037508.34,-20037508.34,20037508.34,20037508.34),
maxResolution: 156543.0339,
units: "m",
projection: "EPSG:900913",
isBaseLayer: true,
numZoomLevels: 19,
displayOutsideMaxExtent: true,
wrapDateLine: true,
}, options);
var url = [
"http://a.maps.agentstorm.com/transit/${z}/${x}/${y}.png",
"http://b.maps.agentstorm.com/transit/${z}/${x}/${y}.png",
"http://c.maps.agentstorm.com/transit/${z}/${x}/${y}.png"
];
var newArguments = [name, url, options];
OpenLayers.Layer.XYZ.prototype.initialize.apply(this, newArguments);
},
CLASS_NAME: "OpenLayers.Layer.AgentStormTransit"
});