Skip to content

Instantly share code, notes, and snippets.

@jeremyboggs
Created September 25, 2012 18:42
Show Gist options
  • Save jeremyboggs/3783643 to your computer and use it in GitHub Desktop.
Save jeremyboggs/3783643 to your computer and use it in GitHub Desktop.
Diff that adds the Imperium Romanum map as a baselayer in Neatline
diff --git a/views/shared/javascripts/neatline_map.js b/views/shared/javascripts/neatline_map.js
index 8894897..253d73a 100644
--- a/views/shared/javascripts/neatline_map.js
+++ b/views/shared/javascripts/neatline_map.js
@@ -848,6 +848,17 @@
}
);
+ this.imrm = new OpenLayers.Layer.XYZ(
+ "Imperium Romanum",
+ [
+ "http://pelagios.dme.ait.ac.at/tilesets/imperium/${z}/${x}/${y}.png"
+ ], {
+ sphericalMercator: true,
+ isBaseLayer: true,
+ numZoomLevels: 12
+ }
+ );
+
return [
this.osm,
this.gphy,
@@ -856,7 +867,8 @@
this.gsat,
this.stwc,
this.sttn,
- this.sttr
+ this.sttr,
+ this.imrm
];
},
@@ -901,6 +913,9 @@
this.map.setBaseLayer(this.sttr);
break;
+ case 'Imperium Romanum':
+ this.map.setBaseLayer(this.imrm);
+ break;
}
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment