Zoom zoom zoom map

From OpenStreetMap Wiki
Jump to navigation Jump to search
Logo.png
This page describes a historic artifact in the history of OpenStreetMap. It does not reflect the current situation, but instead documents the historical concepts, issues, or ideas.
About
This page describes a JavaScript library for slippy maps.
Reason for being historic
This project is dead. Its author recommends to use Leaflet instead.



The github readme's indicate that this project is discontinued, and the author recommends Leaflet instead.

New Version

For the latest version, see: khtml.maplib.

Scale.png

Iphone map with gps tracker.png There is a brand new version of the zoom zoom zoom map at: [1]

It's 5 times faster now on Webkit and about double speed at FireFox.

Internet Explorer support will follow.

Project home: http://github.com/robotnic/khtmlib

Licence: LGPL

Browser Support

  • Webkit: Chrome, Safari - very fast with hardware acceleration
  • webkit on iPhone: moultiouch support
  • Firefox: Bit slower - hardware support will follow in version 3.7 of Firefox
  • Opera: very fast with 10.50. 10.10 is about 4 times slower
  • Konqueror: not supported
  • Internet Explorer: nor supported at the moment

Features

  • very fast zoom
  • vector graphics (point, path, area) with full WGS84
  • history for "fly back"

OLD API

outdated

Zoom zoom zoom map is a slippy map with a smooth zooming feature. It is a javascript library for displaying a map on your own web site. Same licence as OSM

How to use

 <html>
 <head>
 <title>zoom zoom zoom map</title>
 <script type="text/javascript" src="http://www.khtml.org/v0.16/osm.js"> </script>
 <script type="text/javascript">
  function init(){
        map=new kMap(document.getElementById("world"));
        map.mapType("osma");
        map.addControl(new mapControl());
        map.setCenter(20,0,2);
        map.snapZoom(true);
  }
 </script>
 </head>
 <body onload="init()">
   <div id="world" style="position:absolute;top:100px;left:100px;width:600px;height:400px;border:1px  solid black">
   </div>
 </body>
 </html>

Features

  • Very fast zoom
  • Keyboard Support (Cursor, +, -, ENTER)
  • Select an Area with <SHIFT>-Mouse
  • Wheelmouse support
  • simple overlays - very speedy

Examples

Simple: http://www.khtml.org/sw/

Together with Google Map: http://www.khtml.org/

Chrome, Safari

In webkit based browsers the "autosnap" is turned of. It's possible to have a non integer zoom map. Firefox and Explorer uses nearest neighbour for zoom images and "snapZoom" is turned on.

Licence

CC SA-By (same as openstreetmap)

Known Bugs

For bugtracking please use this page

  • Slider sometimes is not at the correct position
  • after resize window, copyright is at the wrong position