Home
Wir über uns
News
Service
Beratung & Planung
Jobs
Kontakt
Impressum
Sitemap

So finden Sie uns

Virtuell haben Sie den Weg zu uns schon gefunden. Das freut uns natürlich. Und damit Sie uns auch ganz reell besuchen können, halten wir hier eine Anfahrtsskizze für Sie bereit.

 

<html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>map.search.ch API Example &quot;Coordinates&quot;</title> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> <script type="text/javascript" src="http://map.search.ch/api/map.js"></script> <script type="text/javascript"> //<![CDATA[ var start, poi; var Map = new SearchChMap({ center:"Zuerich", circle:false }); Map.addPOI(poi = new SearchChPOI({ html:"Start", icon:"p1.gif" })); Map.addEventListener("load", function(e) { if (e.mx) start = [e.mx, e.my]; // Set start first time map is ready }); Map.addEventListener("mouseclick", function(e) { // Check if coordinates provided, left button clicked and zoom at 0.5m per pixel var setpoi = e.mx && (e.button == 1) && (Map.get("zoom") <= 0.5); if (setpoi) poi.set({ center:(start = [e.mx, e.my]) }); return !setpoi; // Only zoom if not setting poi }); Map.addEventListener("mousemove", function(e) { if (start && e.mx) { // Check if coordinates provided var dx = start[0] - e.mx, dy = start[1] - e.my; document.getElementById("info").innerHTML = "Distanz vom Start (" + start + "): " + Math.round(Math.sqrt(dx*dx + dy*dy)) + " m"; } }); //]]> </script> </head> <body> <div id="mapcontainer" style="width:500px; height:400px; border:2px inset #ccc"></div> 
 <div id="info"></div> </body> </html> 
Zurück