Permalink
Cannot retrieve contributors at this time
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>טיפה.לי - טיפת חלב ליד הבית</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"> | |
<meta name="apple-mobile-web-app-capable" content="yes" /> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.6.4/leaflet.css" /> | |
<!--[if lte IE 8]> | |
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.6.4/leaflet.ie.css" /> | |
<![endif]--> | |
<style type="text/css"> | |
body { | |
padding: 0; | |
margin: 0; | |
background-color: #fff; | |
} | |
html, body, #map { | |
height: 100%; | |
} | |
</style> | |
</head> | |
<body> | |
<div id="map"></div> | |
<script src="data/clinics.js"></script> | |
<script src="http://cdn.leafletjs.com/leaflet-0.6.4/leaflet.js"></script> | |
<script type="text/javascript"> | |
var milkIcon = L.icon({ | |
iconUrl : 'img/TipatHalavIcon40x25.png', | |
iconSize : [25, 40], | |
iconAnchor : [13, 39], | |
popupAnchor : [0, -35] | |
}); | |
var WEEKDAYS = ['א','ב','ג','ד','ה','ו','ש']; | |
String.prototype.trim = String.prototype.trim || function trim() { return this.replace(/^\s\s*/, '').replace(/\s\s*$/, ''); }; | |
function onEachFeature(feature, layer) { | |
// console.log(layer); | |
p = feature.properties | |
phone = p.phones.split(',')[0].trim(); | |
marker_html='<div style="text-align: right">' | |
+ '<b>' + p.city + '</b><br />' | |
+ p.address + '<br />' | |
+ '<a href="tel:' + phone + '">' + phone + '</a><br />'; | |
for (i in WEEKDAYS) { | |
if (typeof p.days[i] != 'undefined' && p.days[i].trim() != "סגור") { | |
marker_html += 'יום ' + WEEKDAYS[i] + ' ' + p.days[i] + '<br />'; | |
} | |
} | |
marker_html +='</div>'; | |
layer.bindPopup(marker_html); | |
} | |
var MAP_CENTER = [31.87, 35.00]; | |
var DEFAULT_ZOOM = 11; | |
var map = L.map('map', { scrollWheelZoom: true }).setView(MAP_CENTER, DEFAULT_ZOOM); | |
map.locate({setView : true, maxZoom: 13}); | |
// tile_url = 'http://{s}.tiles.mapbox.com/v3/niryariv.map-n3zuwkkz/{z}/{x}/{y}.png'; | |
tile_url = "http://niryariv.github.io/israel_tiles/{z}/{x}/{y}.png"; | |
L.tileLayer(tile_url, { | |
attribution: '<a href="https://github.com/niryariv/tiptipa">קוד</a> | <a href="http://niryariv.wordpress.com/">ניר</a> - <a href="http://degeladom.wordpress.com/">אלון</a> - <a href="http://about.me/udioron">אודי</a> - <a href="http://www.linkedin.com/profile/view?id=163884606">ארז</a> - <a href="http://inkod-hypera.com/">אילן</a> - שרון - <a href="http://gizra.com/">גיזרה</a> - <a href="http://www.hasadna.org.il/">הסדנא</a>', | |
maxZoom: 16, | |
minZoom: 9 | |
}).addTo(map); | |
L.geoJson(stations, | |
{ | |
pointToLayer: function (feature, latlng) { | |
return L.marker(latlng, {icon: milkIcon}); | |
}, | |
filter: function(feature, layer) { | |
return !feature.properties.error; | |
}, | |
onEachFeature: onEachFeature, | |
} | |
).addTo(map); | |
</script> | |
<script> | |
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ | |
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), | |
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) | |
})(window,document,'script','//www.google-analytics.com/analytics.js','ga'); | |
ga('create', 'UA-43602637-1', 'tipa.li'); | |
ga('send', 'pageview'); | |
</script> | |
</body> | |
</html> | |
<!- Jerusalem, summer 2013 --> |