Skip to content

danwild/ol2-offline

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ol2-offline

A simple example of using OpenLayers V2 with no network connection.

Screenshot

The hard part (for me) was creating an XYZ tileset... but:

Hot tip: use the awesome QTiles plugin for QGIS to easily build tiles sets from raster layers, aka GeoTiffs.

OpenLayers v2 docs are here, but it's essentially just:

var myTilesPath = 'qtiles/bright-earth-tiles/${z}/${x}/${y}.png';
var options = {
	projection: "EPSG:3857",
	center: center,
	zoom: 4,
	layers: [
		new OpenLayers.Layer.OSM("Local Tiles", myTilesPath)
	]
};
var map = new OpenLayers.Map("map", options);

About

A simple example of using OpenLayers V2 with no network connection.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published