Zoom zoom zoom map

From OpenStreetMap Wiki
Jump to: navigation, search

New Version

for neuest 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