TouchMapLight

From OpenStreetMap Wiki
Jump to navigation Jump to search

what it is

touchMapLight is an open source (provided under apache v2 license) JavaScript library for displaying map tiles in webkit browsers. Keeping mobile platforms in mind it's core components are kept compact by size. It can handle titles from OSM, Google, WMS and is easy to extend to new tile based services (but please respect their licensing/ terms of service). It is based on panoJS.

real world examples

what it consists of

The following documentation is based on rev. 46.

Apart from panojs touchMapLight consists of the following Javascript files:

file function size (uncompressed)
touchMapLite.js provides basic functionality and datastructure 6kB
touchMapLite.tileUrlProvider.OSM.js tileUrlProvide capsules tile-sources. This here for OSM <1kB
touchMapLite.tileUrlProvider.GMap.js tileUrlProvide capsules tile-sources. This here for Google Maps. <1kB
touchMapLite.tileUrlProvider.WMS.js Tile-source via wms client requests (getmap) 2kB
touchMapLite.geolocation.js provides geolocation-functionality 2kB
touchMapLite.marker.js code dealing with markers 4kB
touchMapLite.permalink.OSM.js permalink functionality 1kB
touchMapLite.event.touch.js handles touch- and gesture-events <1kB
touchMapLite.event.dblclick.js handles doubleclick-event <1kB
touchMapLite.event.wheel.js handles the mouse-wheel-events <1kB
touchMapLite.SQLite.js local caching of tiles and markers in a sqlight-db (via canvas) <1kB
touchMapLite.SQLite.ini.js initializing the db 2kB
touchMapLite.SQLite.markers.js handling local marker-caching 2kB
touchMapLite.SQLite.tiles.js handling local tile-caching 5kB

code examples

There are a few example html files.

road map

  • get android, palm pre and s60 phones working
  • better documentation
  • ui for markes and sources


how can you use it

  1. Get the code.
  2. modify the examples.
    • there is an index.html which you should look at.
  3. be happy.

links