Permalink
Browse files

Fixing the rest of examples for TemplatedLayer

  • Loading branch information...
1 parent 24f7f41 commit c889439fb544c6381ea14f459222a00b02903341 @tmcw tmcw committed Jan 25, 2012
@@ -101,7 +101,7 @@ renderStaticMap(provider, dimensions, 11, location, function(err, canvas) {
// just one for now...
var providers = {
- osm: new MM.TemplatedMapProvider("http://tile.openstreetmap.org/{Z}/{X}/{Y}.png")
+ osm: new MM.TemplatedLayer("http://tile.openstreetmap.org/{Z}/{X}/{Y}.png")
}
var app = express.createServer();
@@ -9,7 +9,7 @@
// "import" the namespace
var MM = com.modestmaps;
- var provider = new MM.TemplatedMapProvider("http://placehold.it/256/ccc/000.png&text={Z}/{X}/{Y}");
+ var provider = new MM.TemplatedLayer("http://placehold.it/256/ccc/000.png&text={Z}/{X}/{Y}");
map = new MM.Map('map', provider)
map.setCenterZoom(new MM.Location(37.804656, -122.263606), 14);
}
@@ -15,7 +15,7 @@
// defaults to Google-style Mercator projection, so works
// out of the box with OpenStreetMap and friends:
var template = 'http://tile.openstreetmap.org/{Z}/{X}/{Y}.png';
- var provider = new MM.TemplatedMapProvider(template);
+ var provider = new MM.TemplatedLayer(template);
// without a size, it will expand to fit the parent:
map = new MM.Map(parent, provider);
@@ -57,4 +57,4 @@
<div id='map_div'></div>
<a href='#' id='toggle'>toggle map visibility</a>
</body>
-</html>
+</html>
@@ -10,7 +10,7 @@
var template = 'http://{S}tile.openstreetmap.org/{Z}/{X}/{Y}.png';
var subdomains = [ '', 'a.', 'b.', 'c.' ];
- var provider = new MM.TemplatedMapProvider(template, subdomains);
+ var provider = new MM.TemplatedLayer(template, subdomains);
map = new MM.Map(document.body, provider)
@@ -7,7 +7,7 @@
<script type="text/javascript">
var map, layer;
function initMap() {
- var tiles = new MM.TemplatedMapProvider("http://spaceclaw.stamen.com/toner/{Z}/{X}/{Y}.png");
+ var tiles = new MM.TemplatedLayer("http://spaceclaw.stamen.com/toner/{Z}/{X}/{Y}.png");
map = new MM.Map("map", tiles);
layer = new SpotlightLayer();
@@ -13,7 +13,7 @@
locationsByType = {};
function initMap() {
- var provider = new MM.TemplatedMapProvider("http://ecn.t{S}.tiles.virtualearth.net/tiles/r{Q}?g=689&mkt=en-us&lbl=l0&stl=m", [0,1,2,3,4,5,6,7]);
+ var provider = new MM.TemplatedLayer("http://ecn.t{S}.tiles.virtualearth.net/tiles/r{Q}?g=689&mkt=en-us&lbl=l0&stl=m", [0,1,2,3,4,5,6,7]);
map = new MM.Map("map", provider);
map.setCenterZoom(new MM.Location(37.764, -122.419), 12);
@@ -17,13 +17,13 @@
function initMap() {
var baseURL = "http://tiles-523195119.us-east-1.elb.amazonaws.com/";
- var tiles = new MM.TemplatedMapProvider(baseURL + "inundated/{Z}/{X}/{Y}.png");
+ var tiles = new MM.TemplatedLayer(baseURL + "inundated/{Z}/{X}/{Y}.png");
map = new MM.Map("map", tiles);
map.setZoomRange(8, 16);
map.setCenterZoom({lat: 37.804, lon: -122.252}, 9);
- var template = new MM.TemplatedMapProvider(baseURL + "inundation_b/{Z}/{X}/{Y}.png");
+ var template = new MM.TemplatedLayer(baseURL + "inundation_b/{Z}/{X}/{Y}.png");
sprite = new MM.SpriteMapProvider(template);
map.addLayer(sprite);
@@ -20,7 +20,7 @@
}
}
- map = new MM.Map('map', new MM.TemplatedMapProvider(input.value))
+ map = new MM.Map('map', new MM.TemplatedLayer(input.value))
var f = new MM.Follower(map, new MM.Location(37.811530, -122.2666097), '&#xB0; Broadway and Grand');
@@ -11,7 +11,7 @@
function initMap() {
var template = 'http://{S}tile.openstreetmap.org/{Z}/{X}/{Y}.png';
var subdomains = [ '', 'a.', 'b.', 'c.' ];
- var provider = new com.modestmaps.TemplatedMapProvider(template, subdomains);
+ var provider = new com.modestmaps.TemplatedLayer(template, subdomains);
map = new com.modestmaps.Map('map',
provider,
null, [
@@ -13,9 +13,9 @@
var container = document.getElementById('container');
leftMap = new MM.Map('leftMap',
- new MM.TemplatedMapProvider("http://tile.openstreetmap.org/{Z}/{X}/{Y}.png"));
+ new MM.TemplatedLayer("http://tile.openstreetmap.org/{Z}/{X}/{Y}.png"));
rightMap = new MM.Map('rightMap',
- new MM.TemplatedMapProvider("http://s3.amazonaws.com/com.modestmaps.bluemarble/{Z}-r{Y}-c{X}.jpg"));
+ new MM.TemplatedLayer("http://s3.amazonaws.com/com.modestmaps.bluemarble/{Z}-r{Y}-c{X}.jpg"));
leftMap.parent.style.position = 'absolute';
leftMap.parent.style.left = '0px';
@@ -13,7 +13,7 @@
var template = 'http://{S}tile.openstreetmap.org/{Z}/{X}/{Y}.png';
var subdomains = [ 'a.', 'b.', 'c.', ''];
- var provider = new MM.TemplatedMapProvider(template, subdomains);
+ var provider = new MM.TemplatedLayer(template, subdomains);
map = new MM.Map('map', provider);
@@ -13,7 +13,7 @@
// http://blog.mapquest.com/2010/07/09/mapquest-opens-up/
var template = 'http://{S}.mqcdn.com/tiles/1.0.0/osm/{Z}/{X}/{Y}.png';
var subdomains = [ 'otile1', 'otile2', 'otile3', 'otile4'];
- var provider = new MM.TemplatedMapProvider(template, subdomains);
+ var provider = new MM.TemplatedLayer(template, subdomains);
map = new MM.Map('map', provider);

0 comments on commit c889439

Please sign in to comment.