2015年7月16日木曜日

Leaflet 1.0ベータ版がリリース

Announcing Leaflet 1.0 beta 1 が公開されていました。
0.7よりのスワイプ動作などのマップの移動がスムーズになっていると思いましたが、imgタグを使用している宿命なのでしょうか、大きく改善されたとは感じませんでした。

サンプル1.0beta2

<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height, target-densitydpi=device-dpi" />
    <link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-1.0.0-b1/leaflet.css" />
    <script src="http://cdn.leafletjs.com/leaflet-1.0.0-b1/leaflet.js"></script>
</head>
<body>
<div id="map" style="width: 500px;height: 500px"></div>

<script>
    var map = L.map('map', {
        center: [51.505, -0.09],
        zoom: 13
    });
    L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',{
        attribution: '© <a href="http://osm.org/copyright">OpenStreetMap</a> contributors, <a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>',
        maxZoom: 19
    }).addTo(map);

</script>
</body>
</html>