狠狠撸

狠狠撸Share a Scribd company logo
4D and Leaflet
Olivier Deschanels, Senior Consultant
what is Leaflet?
what is Leaflet?
what is Leaflet?
what is Leaflet?
who uses Leaflet?
who uses Leaflet?
techno under Leaflet
techno under Leaflet
techno under Leaflet
techno under Leaflet
わずか33KBのJavaScript!
techno under Leaflet
Leaflet keywords
Leaflet keywords
Leaflet keywords
Leaflet keywords
Leaflet keywords
Leaflet competitors
Google Maps
Leaflet competitors
Google Maps OpenLayers
Leaflet competitors
tile storm
tile storm
OSM Mapnick
ESRI NavCharts
ESRI World Imagery ESRI National Geographic
Google hybride
OSM Thunderforest Transport
OSM Mapnick
Google roadmap
MapBox Warden
OSM Thunderforest Landscape
Geocommons Acetate
ESRI World Topo Map ESRI World Street MapGoogle satellite
OSM Thunderforest Cycle
OSM OpenPisteMap
OSM OpenSeaMap
OSM OpenWeatherMap
Skobbler maps
Stamen Watercolor
Leaflet
Leaflet
Web area
Web page
Web app
Leaflet API
Leaflet API
Leaflet API
http://leafletjs.com/reference.html
Leaflet in 6 steps
<html>
<head>
</head>
<body>
<script>
?
?
?
</script>
</body>
</html>
<html>
<head>
</head>
<body>
<script>
?
?
?
</script>
</body>
</html>
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.css" />
1. スタイル
<html>
<head>
</head>
<body>
<script>
?
?
?
</script>
</body>
</html>
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.css" />
<script src=/slideshow/leaflet-64146985/64146985/"http:/cdn.leafletjs.com/leaflet-0.7.3/leaflet.js"></script>
1. スタイル
2. JSライブラリ
<html>
<head>
</head>
<body>
<script>
?
?
?
</script>
</body>
</html>
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.css" />
<script src=/slideshow/leaflet-64146985/64146985/"http:/cdn.leafletjs.com/leaflet-0.7.3/leaflet.js"></script>
<div id="map"
1. スタイル
2. JSライブラリ
3. 受け?れ?
divエリア
<html>
<head>
</head>
<body>
<script>
?
?
?
</script>
</body>
</html>
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.css" />
<script src=/slideshow/leaflet-64146985/64146985/"http:/cdn.leafletjs.com/leaflet-0.7.3/leaflet.js"></script>
<div id="map"??style="height:600px;width:800px"/>
1. スタイル
2. JSライブラリ
3. 受け?れ?
divエリア
4. 地図のサイズ
<html>
<head>
</head>
<body>
<script>
?
?
?
</script>
</body>
</html>
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.css" />
<script src=/slideshow/leaflet-64146985/64146985/"http:/cdn.leafletjs.com/leaflet-0.7.3/leaflet.js"></script>
<div id="map"??style="height:600px;width:800px"/>
var map = L.map('map').setView([47, -2.25], 13);
1. スタイル
2. JSライブラリ
3. 受け?れ?
divエリア
4. 地図のサイズ
5. 地図の位置
<html>
<head>
</head>
<body>
<script>
?
?
?
</script>
</body>
</html>
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.css" />
<script src=/slideshow/leaflet-64146985/64146985/"http:/cdn.leafletjs.com/leaflet-0.7.3/leaflet.js"></script>
<div id="map"??style="height:600px;width:800px"/>
var map = L.map('map').setView([47, -2.25], 13);
L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
attribution: 'copyright',
maxZoom: 18
}).addTo(map);
1. スタイル
2. JSライブラリ
3. 受け?れ?
divエリア
4. 地図のサイズ
5. 地図の位置
6.地図の内容
<html>
<head>
</head>
<body>
<script>
?
?
?
</script>
</body>
</html>
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.css" />
<script src=/slideshow/leaflet-64146985/64146985/"http:/cdn.leafletjs.com/leaflet-0.7.3/leaflet.js"></script>
<div id="map"??style="height:600px;width:800px"/>
var map = L.map('map').setView([47, -2.25], 13);
L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
attribution: 'copyright',
maxZoom: 18
}).addTo(map);
1. スタイル
2. JSライブラリ
3. 受け?れ?
divエリア
4. 地図のサイズ
5. 地図の位置
6.地図の内容
recipe for 4D use
Lea?et_Demo01
first_step.html
recipe for 4D use
Lea?et_Demo01
first_step.html
recipe for 4D use
Lea?et_Demo01
first_step.html
recipe for 4D use
Lea?et_Demo01
first_step.html
recipe for 4D use
Lea?et_Demo01
add a marker
Lea?et_Demo02
<html>
<head>
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.css" />
<script src=/slideshow/leaflet-64146985/64146985/"http:/cdn.leafletjs.com/leaflet-0.7.3/leaflet.js"></script>
</head>
<body>
<div id="map" style="height:100%;width:100%"/>
<script>
var map = L.map('map').setView([47,-2.25], 13);
L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
attribution: 'copyright',
maxZoom: 18
}).addTo(map);
</script>
</body>
</html>
add a marker
Lea?et_Demo02
<html>
<head>
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.css" />
<script src=/slideshow/leaflet-64146985/64146985/"http:/cdn.leafletjs.com/leaflet-0.7.3/leaflet.js"></script>
</head>
<body>
<div id="map" style="height:100%;width:100%"/>
<script>
var map = L.map('map').setView([47,-2.25], 13);
L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
attribution: 'copyright',
maxZoom: 18
}).addTo(map);
</script>
</body>
</html>
L.marker([47,-2.25]).addTo(map);
add a marker
Lea?et_Demo02
<html>
<head>
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.css" />
<script src=/slideshow/leaflet-64146985/64146985/"http:/cdn.leafletjs.com/leaflet-0.7.3/leaflet.js"></script>
</head>
<body>
<div id="map" style="height:100%;width:100%"/>
<script>
var map = L.map('map').setView([47,-2.25], 13);
L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
attribution: 'copyright',
maxZoom: 18
}).addTo(map);
</script>
</body>
</html>
L.marker([47,-2.25]).addTo(map);
add a marker
Lea?et_Demo02
collection of markers
Lea?et_Demo03
collection of markers
Lea?et_Demo03
collection of markers
Lea?et_Demo03
collection of markers
Lea?et_Demo03
collection of markers
Lea?et_Demo03
collection of markers
"IATA_AirportCode": "AUR",
"Location": "Aurillac",
"Latitude": 44.883333333333,
"Longitude": 2.4166666666667
},
{
"IATA_AirportCode": "AUF",
"Location": "Branches",
"Latitude": 47.85,
"Longitude": 3.4833333333333
},
…..
{
"IATA_AirportCode": "VHY",
"Location": "Charmeil",
"Latitude": 46.166666666667,
"Longitude": 3.4
},
{
"IATA_AirportCode": "V24",
"Location": "Velizy",
"Latitude": 48.766666666667,
"Longitude": 2.2
},
{
"IATA_AirportCode": "VTL",
"Location": "Vittel",
"Latitude": 48.216666666667,
"Longitude": 5.9333333333333
}
]
Lea?et_Demo03
Lea?et_Demo03
collection of markers
<html>
<head>
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.css" />
<script src=/slideshow/leaflet-64146985/64146985/"http:/cdn.leafletjs.com/leaflet-0.7.3/leaflet.js"></script>
</head>
<body>
<div id="map" style="height:100%;width:100%"/>
<script>
var map = L.map('map').setView([47,-2.25], 13);
L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
attribution: 'copyright',
maxZoom: 18
}).addTo(map);
</script>
</body>
</html>
Lea?et_Demo03
collection of markers
<html>
<head>
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.css" />
<script src=/slideshow/leaflet-64146985/64146985/"http:/cdn.leafletjs.com/leaflet-0.7.3/leaflet.js"></script>
</head>
<body>
<div id="map" style="height:100%;width:100%"/>
<script>
var map = L.map('map').setView([47,-2.25], 13);
L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
attribution: 'copyright',
maxZoom: 18
}).addTo(map);
</script>
</body>
</html>
Lea?et_Demo03
collection of markers
<html>
<head>
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.css" />
<script src=/slideshow/leaflet-64146985/64146985/"http:/cdn.leafletjs.com/leaflet-0.7.3/leaflet.js"></script>
</head>
<body>
<div id="map" style="height:100%;width:100%"/>
<script>
var map = L.map('map').setView([47,-2.25], 13);
L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
attribution: 'copyright',
maxZoom: 18
}).addTo(map);
</script>
</body>
</html>
var airports = <!--#4DHTML airports_json-->;
Lea?et_Demo03
collection of markers
<html>
<head>
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.css" />
<script src=/slideshow/leaflet-64146985/64146985/"http:/cdn.leafletjs.com/leaflet-0.7.3/leaflet.js"></script>
</head>
<body>
<div id="map" style="height:100%;width:100%"/>
<script>
var map = L.map('map').setView([47,-2.25], 13);
L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
attribution: 'copyright',
maxZoom: 18
}).addTo(map);
</script>
</body>
</html>
var airports = <!--#4DHTML airports_json-->;
… {
"IATA_AirportCode": "AUR",
"Location": "Aurillac",
"Latitude": 44.883333333333,
"Longitude": 2.4166666666667
},
{
"IATA_AirportCode": "AUF",
"Location": "Branches",
"Latitude": 47.85,
"Longitude": 3.4833333333333
} …
Lea?et_Demo03
collection of markers
<html>
<head>
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.css" />
<script src=/slideshow/leaflet-64146985/64146985/"http:/cdn.leafletjs.com/leaflet-0.7.3/leaflet.js"></script>
</head>
<body>
<div id="map" style="height:100%;width:100%"/>
<script>
var map = L.map('map').setView([47,-2.25], 13);
L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
attribution: 'copyright',
maxZoom: 18
}).addTo(map);
</script>
</body>
</html>
var airports = <!--#4DHTML airports_json-->;
for (var i=0;i<airports.length;i++){
L.marker([airports[i].Latitude,airports[i].Longitude]).addTo(map);
};
… {
"IATA_AirportCode": "AUR",
"Location": "Aurillac",
"Latitude": 44.883333333333,
"Longitude": 2.4166666666667
},
{
"IATA_AirportCode": "AUF",
"Location": "Branches",
"Latitude": 47.85,
"Longitude": 3.4833333333333
} …
Lea?et_Demo03
collection of markers
<html>
<head>
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.css" />
<script src=/slideshow/leaflet-64146985/64146985/"http:/cdn.leafletjs.com/leaflet-0.7.3/leaflet.js"></script>
</head>
<body>
<div id="map" style="height:100%;width:100%"/>
<script>
var map = L.map('map').setView([47,-2.25], 13);
L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
attribution: 'copyright',
maxZoom: 18
}).addTo(map);
</script>
</body>
</html>
var airports = <!--#4DHTML airports_json-->;
for (var i=0;i<airports.length;i++){
L.marker([airports[i].Latitude,airports[i].Longitude]).addTo(map);
};
… {
"IATA_AirportCode": "AUR",
"Location": "Aurillac",
"Latitude": 44.883333333333,
"Longitude": 2.4166666666667
},
{
"IATA_AirportCode": "AUF",
"Location": "Branches",
"Latitude": 47.85,
"Longitude": 3.4833333333333
} …
Lea?et_Demo03
collection of markers
for (var i=0;i<airports.length;i++){
L.marker([airports[i].Latitude,airports[i].Longitude]).addTo(map);
};
Lea?et_Demo04
display tips
for (var i=0;i<airports.length;i++){
L.marker([airports[i].Latitude,airports[i].Longitude])
.addTo(map);
};
for (var i=0;i<airports.length;i++){
L.marker([airports[i].Latitude,airports[i].Longitude]).addTo(map);
};
Lea?et_Demo04
display tips
for (var i=0;i<airports.length;i++){
L.marker([airports[i].Latitude,airports[i].Longitude])
.addTo(map);
};
for (var i=0;i<airports.length;i++){
L.marker([airports[i].Latitude,airports[i].Longitude])
.addTo(map);
};
Lea?et_Demo04
display tips
for (var i=0;i<airports.length;i++){
L.marker([airports[i].Latitude,airports[i].Longitude])
.addTo(map);
};
for (var i=0;i<airports.length;i++){
L.marker([airports[i].Latitude,airports[i].Longitude])
.addTo(map);
};
.bindPopup(airports[i].Location)
Lea?et_Demo04
display tips
for (var i=0;i<airports.length;i++){
L.marker([airports[i].Latitude,airports[i].Longitude])
.addTo(map);
};
Lea?et_Demo05
popupContent = "<b>"+airports[i].Location+"</b><br/><div id='"+airports[i].UUID+"'>"
popupContent += "<a href='#'>more info</a></div>"
Lea?et_Demo05
popupContent = "<b>"+airports[i].Location+"</b><br/><div id='"+airports[i].UUID+"'>"
popupContent += "<a href='#'>more info</a></div>"
Lea?et_Demo05
popupContent = "<b>"+airports[i].Location+"</b><br/><div id='"+airports[i].UUID+"'>"
popupContent += "<a href='#'>more info</a></div>"
map.on('popupopen', function(e) {
var myDiv=e.popup._contentNode.childNodes[2];
if (myDiv){
myDiv.onclick = function(ee) {
$4d.Airport_PlusInfo(myDiv.id,function(dollarZero){
ee.target.parentElement.innerHTML=dollarZero;
});
};
};
});
Lea?et_Demo05
popupContent = "<b>"+airports[i].Location+"</b><br/><div id='"+airports[i].UUID+"'>"
popupContent += "<a href='#'>more info</a></div>"
map.on('popupopen', function(e) {
var myDiv=e.popup._contentNode.childNodes[2];
if (myDiv){
myDiv.onclick = function(ee) {
$4d.Airport_PlusInfo(myDiv.id,function(dollarZero){
ee.target.parentElement.innerHTML=dollarZero;
});
};
};
});
Lea?et_Demo05
popupContent = "<b>"+airports[i].Location+"</b><br/><div id='"+airports[i].UUID+"'>"
popupContent += "<a href='#'>more info</a></div>"
map.on('popupopen', function(e) {
var myDiv=e.popup._contentNode.childNodes[2];
if (myDiv){
myDiv.onclick = function(ee) {
$4d.Airport_PlusInfo(myDiv.id,function(dollarZero){
ee.target.parentElement.innerHTML=dollarZero;
});
};
};
});
Lea?et_Demo05
popupContent = "<b>"+airports[i].Location+"</b><br/><div id='"+airports[i].UUID+"'>"
popupContent += "<a href='#'>more info</a></div>"
map.on('popupopen', function(e) {
var myDiv=e.popup._contentNode.childNodes[2];
if (myDiv){
myDiv.onclick = function(ee) {
$4d.Airport_PlusInfo(myDiv.id,function(dollarZero){
ee.target.parentElement.innerHTML=dollarZero;
});
};
};
});
Lea?et_Demo05
popupContent = "<b>"+airports[i].Location+"</b><br/><div id='"+airports[i].UUID+"'>"
popupContent += "<a href='#'>more info</a></div>"
map.on('popupopen', function(e) {
var myDiv=e.popup._contentNode.childNodes[2];
if (myDiv){
myDiv.onclick = function(ee) {
$4d.Airport_PlusInfo(myDiv.id,function(dollarZero){
ee.target.parentElement.innerHTML=dollarZero;
});
};
};
});
Lea?et_Demo05
popupContent = "<b>"+airports[i].Location+"</b><br/><div id='"+airports[i].UUID+"'>"
popupContent += "<a href='#'>more info</a></div>"
map.on('popupopen', function(e) {
var myDiv=e.popup._contentNode.childNodes[2];
if (myDiv){
myDiv.onclick = function(ee) {
$4d.Airport_PlusInfo(myDiv.id,function(dollarZero){
ee.target.parentElement.innerHTML=dollarZero;
});
};
};
});
Lea?et_Demo05
popupContent = "<b>"+airports[i].Location+"</b><br/><div id='"+airports[i].UUID+"'>"
popupContent += "<a href='#'>more info</a></div>"
map.on('popupopen', function(e) {
var myDiv=e.popup._contentNode.childNodes[2];
if (myDiv){
myDiv.onclick = function(ee) {
$4d.Airport_PlusInfo(myDiv.id,function(dollarZero){
ee.target.parentElement.innerHTML=dollarZero;
});
};
};
});
Lea?et_Demo05
popupContent = "<b>"+airports[i].Location+"</b><br/><div id='"+airports[i].UUID+"'>"
popupContent += "<a href='#'>more info</a></div>"
.bindPopup(popupContent,{maxWidth:500,minWidth:300})
map.on('popupopen', function(e) {
var myDiv=e.popup._contentNode.childNodes[2];
if (myDiv){
myDiv.onclick = function(ee) {
$4d.Airport_PlusInfo(myDiv.id,function(dollarZero){
ee.target.parentElement.innerHTML=dollarZero;
});
};
};
});
Lea?et_Demo05
popupContent = "<b>"+airports[i].Location+"</b><br/><div id='"+airports[i].UUID+"'>"
popupContent += "<a href='#'>more info</a></div>"
.bindPopup(popupContent,{maxWidth:500,minWidth:300})
map.on('popupopen', function(e) {
var myDiv=e.popup._contentNode.childNodes[2];
if (myDiv){
myDiv.onclick = function(ee) {
$4d.Airport_PlusInfo(myDiv.id,function(dollarZero){
ee.target.parentElement.innerHTML=dollarZero;
});
};
};
});
ポップアップ表?で
発?するイベント
Lea?et_Demo05
popupContent = "<b>"+airports[i].Location+"</b><br/><div id='"+airports[i].UUID+"'>"
popupContent += "<a href='#'>more info</a></div>"
.bindPopup(popupContent,{maxWidth:500,minWidth:300})
map.on('popupopen', function(e) {
var myDiv=e.popup._contentNode.childNodes[2];
if (myDiv){
myDiv.onclick = function(ee) {
$4d.Airport_PlusInfo(myDiv.id,function(dollarZero){
ee.target.parentElement.innerHTML=dollarZero;
});
};
};
});
ポップアップ表?で
発?するイベント
e.popup : ポップ
アップを管理する
オブジェクト
Lea?et_Demo05
popupContent = "<b>"+airports[i].Location+"</b><br/><div id='"+airports[i].UUID+"'>"
popupContent += "<a href='#'>more info</a></div>"
.bindPopup(popupContent,{maxWidth:500,minWidth:300})
map.on('popupopen', function(e) {
var myDiv=e.popup._contentNode.childNodes[2];
if (myDiv){
myDiv.onclick = function(ee) {
$4d.Airport_PlusInfo(myDiv.id,function(dollarZero){
ee.target.parentElement.innerHTML=dollarZero;
});
};
};
});
ポップアップ表?で
発?するイベント
$4d : JSから?
メソッドをコールす
ることができる
e.popup : ポップ
アップを管理する
オブジェクト
Lea?et_Demo05
popupContent = "<b>"+airports[i].Location+"</b><br/><div id='"+airports[i].UUID+"'>"
popupContent += "<a href='#'>more info</a></div>"
.bindPopup(popupContent,{maxWidth:500,minWidth:300})
map.on('popupopen', function(e) {
var myDiv=e.popup._contentNode.childNodes[2];
if (myDiv){
myDiv.onclick = function(ee) {
$4d.Airport_PlusInfo(myDiv.id,function(dollarZero){
ee.target.parentElement.innerHTML=dollarZero;
});
};
};
});
ポップアップ表?で
発?するイベント
$4d : JSから?
メソッドをコールす
ることができる
メソッドの戻り値を処理するコールバック関数
e.popup : ポップ
アップを管理する
オブジェクト
Lea?et_Demo05
popupContent = "<b>"+airports[i].Location+"</b><br/><div id='"+airports[i].UUID+"'>"
popupContent += "<a href='#'>more info</a></div>"
.bindPopup(popupContent,{maxWidth:500,minWidth:300})
map.on('popupopen', function(e) {
var myDiv=e.popup._contentNode.childNodes[2];
if (myDiv){
myDiv.onclick = function(ee) {
$4d.Airport_PlusInfo(myDiv.id,function(dollarZero){
ee.target.parentElement.innerHTML=dollarZero;
});
};
};
});
ポップアップ表?で
発?するイベント
$4d : JSから?
メソッドをコールす
ることができる
メソッドの戻り値を処理するコールバック関数
e.popup : ポップ
アップを管理する
オブジェクト
ee : クリックを発?させたDOMを操作
Lea?et_Demo05
var airports = <!--#4DHTML airports_json-->;
var map = L.map('map').setView([<!--#4DHTML airports_latitude-->,<!--#4DHTML
airports_longitude-->], L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {attribution:
'copyright',maxZoom: 18}).addTo(map);
for (var i=0;i<airports.length;i++){
L.marker([airports[i].Latitude,airports[i].Longitude])
.addTo(map);
};
popupContent = "<b>"+airports[i].Location+"</b><br/><div id='"+airports[i].UUID+"'>"
popupContent += "<a href='#'>more info</a></div>"
.bindPopup(popupContent,{maxWidth:500,minWidth:300})
map.on('popupopen', function(e) {
var myDiv=e.popup._contentNode.childNodes[2];
if (myDiv){
myDiv.onclick = function(ee) {
$4d.Airport_PlusInfo(myDiv.id,function(dollarZero){
ee.target.parentElement.innerHTML=dollarZero;
});
};
};
});
ポップアップ表?で
発?するイベント
$4d : JSから?
メソッドをコールす
ることができる
メソッドの戻り値を処理するコールバック関数
e.popup : ポップ
アップを管理する
オブジェクト
ee : クリックを発?させたDOMを操作
Lea?et_Demo05
Lea?et_Demo05
$4d
$4d.myMethod(param1, … paramN,function(dollarZero){
//my javascript code using dollarZero
});
Lea?et_Demo05
$4d
$4d.myMethod(param1, … paramN,function(dollarZero){
//my javascript code using dollarZero
});
Lea?et_Demo05
$4d
$4d.myMethod(param1, … paramN,function(dollarZero){
//my javascript code using dollarZero
});
Lea?et_Demo05
$4d
Lea?et_Demo06
control of the map
zoomIn = function(){
map.zoomIn();
return map.getZoom();
};
zoomOut = function(){
map.zoomOut();
return map.getZoom();
};
Lea?et_Demo06
control of the map
zoomIn = function(){
map.zoomIn();
return map.getZoom();
};
zoomOut = function(){
map.zoomOut();
return map.getZoom();
};
Lea?et_Demo06
control of the map
zoomIn = function(){
map.zoomIn();
return map.getZoom();
};
zoomOut = function(){
map.zoomOut();
return map.getZoom();
};
WA EXECUTE JAVASCRIPT FUNCTION(*;"zw_lea?et";"zoomIn";zv_zoom)
Lea?et_Demo06
control of the map
zoomIn = function(){
map.zoomIn();
return map.getZoom();
};
zoomOut = function(){
map.zoomOut();
return map.getZoom();
};
WA EXECUTE JAVASCRIPT FUNCTION(*;"zw_lea?et";"zoomIn";zv_zoom)
WA EXECUTE JAVASCRIPT FUNCTION(*;"zw_lea?et";"zoomOut";zv_zoom)
Lea?et_Demo06
control of the map
zoomIn = function(){
map.zoomIn();
return map.getZoom();
};
zoomOut = function(){
map.zoomOut();
return map.getZoom();
};
WA EXECUTE JAVASCRIPT FUNCTION(*;"zw_lea?et";"zoomIn";zv_zoom)
WA EXECUTE JAVASCRIPT FUNCTION(*;"zw_lea?et";"zoomOut";zv_zoom)
エリア内にあるJS関数の名前
Lea?et_Demo06
control of the map
zoomIn = function(){
map.zoomIn();
return map.getZoom();
};
zoomOut = function(){
map.zoomOut();
return map.getZoom();
};
WA EXECUTE JAVASCRIPT FUNCTION(*;"zw_lea?et";"zoomIn";zv_zoom)
WA EXECUTE JAVASCRIPT FUNCTION(*;"zw_lea?et";"zoomOut";zv_zoom)
エリア内にあるJS関数の名前
JS関数の戻り値
Lea?et_Demo06
control of the map
zoomIn = function(){
map.zoomIn();
return map.getZoom();
};
zoomOut = function(){
map.zoomOut();
return map.getZoom();
};
WA EXECUTE JAVASCRIPT FUNCTION(*;"zw_lea?et";"zoomIn";zv_zoom)
WA EXECUTE JAVASCRIPT FUNCTION(*;"zw_lea?et";"zoomOut";zv_zoom)
エリア内にあるJS関数の名前
JS関数の戻り値
ズームを上げる
Lea?et関数
Lea?et_Demo06
control of the map
ズーム率を返す
Lea?et関数
zoomIn = function(){
map.zoomIn();
return map.getZoom();
};
zoomOut = function(){
map.zoomOut();
return map.getZoom();
};
WA EXECUTE JAVASCRIPT FUNCTION(*;"zw_lea?et";"zoomIn";zv_zoom)
WA EXECUTE JAVASCRIPT FUNCTION(*;"zw_lea?et";"zoomOut";zv_zoom)
エリア内にあるJS関数の名前
JS関数の戻り値
ズームを上げる
Lea?et関数
Lea?et_Demo06
control of the map
drawing on the map
Lea?et_Demo08
drawing on the map
Lea?et_Demo08
drawing on the map
Lea?et_Demo08
drawing on the map
TracerLigne = function (c) {
L.polyline([[c.coords[0].lat,c.coords[0].lng],
[c.coords[1].lat,c.coords[1].lng]],
{
color: 'red',weight: 3,
opacity: 0.5,smoothFactor: 1
})
.addTo(map);
};
Lea?et_Demo08
drawing on the map
TracerLigne = function (c) {
L.polyline([[c.coords[0].lat,c.coords[0].lng],
[c.coords[1].lat,c.coords[1].lng]],
{
color: 'red',weight: 3,
opacity: 0.5,smoothFactor: 1
})
.addTo(map);
};
{
"coords": [
{
"lat": 48.433333333333,
"lng": -4.4166666666667
},
{
"lat": 41.5,
"lng": 9.0833333333333
}
]
}
Lea?et_Demo08
covered zone
Lea?et_Demo09
covered zone
Lea?et_Demo09
covered zone
Lea?et_Demo09
covered zone
Lea?et_Demo09
covered zone
var map = L.map('map').setView([<!--#4DHTML airports_latitude-->,
<!--#4DHTML airports_longitude-->],6);
L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
attribution: 'copyright',
maxZoom: 18
}).addTo(map);
TracerCercle = function (c) {
L.circle([c.lat,c.lng],50000,
{
color: 'blue', weight: 3,
opacity: 0.5, smoothFactor: 1
})
.addTo(map);
};
Lea?et_Demo09
exchanging parameters
Lea?et_Demo11
exchanging parameters
Lea?et_Demo11
exchanging parameters$paramオブジェクト宣?
Lea?et_Demo11
exchanging parameters$paramオブジェクト宣?
Lea?et_Demo11
属性値をセット
exchanging parameters$paramオブジェクト宣?
Lea?et_Demo11
パラメーターとして?
オブジェクトを使?
属性値をセット
exchanging parameters
Lea?et_Demo11
exchanging parameters
Lea?et_Demo11
exchanging parameters
<!--#4DEVAL $mapParameters:=$1-->
Lea?et_Demo11
exchanging parameters
<!--#4DEVAL $mapParameters:=$1-->
パラメーターオブジェクトから値
をローカル変数に代?
Lea?et_Demo11
exchanging parameters
<!--#4DEVAL $mapParameters:=$1-->
<!--#4DEVAL $centerLatitude:=46-->
パラメーターオブジェクトから値
をローカル変数に代?
Lea?et_Demo11
exchanging parameters
<!--#4DEVAL $mapParameters:=$1-->
<!--#4DEVAL $centerLatitude:=46-->
パラメーターオブジェクトから値
をローカル変数に代?
デフォルト緯度 : 46°
Lea?et_Demo11
exchanging parameters
<!--#4DEVAL $mapParameters:=$1-->
<!--#4DEVAL $centerLatitude:=46-->
<!--#4DIF (OB Is defined:C1231($mapParameters;"centerLatitude"))-->
<!--#4DEVAL $centerLatitude:=OB GET:C1224($mapParameters;"centerLatitude")-->
<!--#4DENDIF-->
パラメーターオブジェクトから値
をローカル変数に代?
デフォルト緯度 : 46°
Lea?et_Demo11
exchanging parameters
<!--#4DEVAL $mapParameters:=$1-->
<!--#4DEVAL $centerLatitude:=46-->
<!--#4DIF (OB Is defined:C1231($mapParameters;"centerLatitude"))-->
<!--#4DEVAL $centerLatitude:=OB GET:C1224($mapParameters;"centerLatitude")-->
<!--#4DENDIF-->
パラメーターオブジェクトから値
をローカル変数に代?
デフォルト緯度 : 46°
Lea?et_Demo11
centerLatitudeがあれば使?する
exchanging parameters
<!--#4DEVAL $mapParameters:=$1-->
<!--#4DEVAL $centerLatitude:=46-->
<!--#4DIF (OB Is defined:C1231($mapParameters;"centerLatitude"))-->
<!--#4DEVAL $centerLatitude:=OB GET:C1224($mapParameters;"centerLatitude")-->
<!--#4DENDIF-->
<!--#4DEVAL $centerLongitude:=1-->
パラメーターオブジェクトから値
をローカル変数に代?
デフォルト緯度 : 46°
Lea?et_Demo11
centerLatitudeがあれば使?する
exchanging parameters
<!--#4DEVAL $mapParameters:=$1-->
<!--#4DEVAL $centerLatitude:=46-->
<!--#4DIF (OB Is defined:C1231($mapParameters;"centerLatitude"))-->
<!--#4DEVAL $centerLatitude:=OB GET:C1224($mapParameters;"centerLatitude")-->
<!--#4DENDIF-->
<!--#4DEVAL $centerLongitude:=1-->
<!--#4DIF (OB Is defined:C1231($mapParameters;"centerLongitude"))-->
<!--#4DEVAL $centerLongitude:=OB GET:C1224($mapParameters;"centerLongitude")-->
<!--#4DENDIF-->
パラメーターオブジェクトから値
をローカル変数に代?
デフォルト緯度 : 46°
Lea?et_Demo11
centerLatitudeがあれば使?する
exchanging parameters
<!--#4DEVAL $mapParameters:=$1-->
<!--#4DEVAL $centerLatitude:=46-->
<!--#4DIF (OB Is defined:C1231($mapParameters;"centerLatitude"))-->
<!--#4DEVAL $centerLatitude:=OB GET:C1224($mapParameters;"centerLatitude")-->
<!--#4DENDIF-->
<!--#4DEVAL $centerLongitude:=1-->
<!--#4DIF (OB Is defined:C1231($mapParameters;"centerLongitude"))-->
<!--#4DEVAL $centerLongitude:=OB GET:C1224($mapParameters;"centerLongitude")-->
<!--#4DENDIF-->
パラメーターオブジェクトから値
をローカル変数に代?
デフォルト緯度 : 46°
C1224 : C = コマンド,
1224 = 識別番号
Lea?et_Demo11
centerLatitudeがあれば使?する
exchanging parameters
<!--#4DEVAL $mapParameters:=$1-->
<!--#4DEVAL $centerLatitude:=46-->
<!--#4DIF (OB Is defined:C1231($mapParameters;"centerLatitude"))-->
<!--#4DEVAL $centerLatitude:=OB GET:C1224($mapParameters;"centerLatitude")-->
<!--#4DENDIF-->
<!--#4DEVAL $centerLongitude:=1-->
<!--#4DIF (OB Is defined:C1231($mapParameters;"centerLongitude"))-->
<!--#4DEVAL $centerLongitude:=OB GET:C1224($mapParameters;"centerLongitude")-->
<!--#4DENDIF-->
var map = L.map('map').setView([<!--#4DHTML $centerLatitude-->,<!--#4DHTML $centerLongitude-->],6);
パラメーターオブジェクトから値
をローカル変数に代?
デフォルト緯度 : 46°
C1224 : C = コマンド,
1224 = 識別番号
Lea?et_Demo11
centerLatitudeがあれば使?する
exchanging parameters
<!--#4DEVAL $mapParameters:=$1-->
<!--#4DEVAL $centerLatitude:=46-->
<!--#4DIF (OB Is defined:C1231($mapParameters;"centerLatitude"))-->
<!--#4DEVAL $centerLatitude:=OB GET:C1224($mapParameters;"centerLatitude")-->
<!--#4DENDIF-->
<!--#4DEVAL $centerLongitude:=1-->
<!--#4DIF (OB Is defined:C1231($mapParameters;"centerLongitude"))-->
<!--#4DEVAL $centerLongitude:=OB GET:C1224($mapParameters;"centerLongitude")-->
<!--#4DENDIF-->
var map = L.map('map').setView([<!--#4DHTML $centerLatitude-->,<!--#4DHTML $centerLongitude-->],6);
L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
attribution: 'copyright',
maxZoom: 18
}).addTo(map);
パラメーターオブジェクトから値
をローカル変数に代?
デフォルト緯度 : 46°
C1224 : C = コマンド,
1224 = 識別番号
Lea?et_Demo11
centerLatitudeがあれば使?する
exchanging parameters
<!--#4DEVAL $mapParameters:=$1-->
<!--#4DEVAL $centerLatitude:=46-->
<!--#4DIF (OB Is defined:C1231($mapParameters;"centerLatitude"))-->
<!--#4DEVAL $centerLatitude:=OB GET:C1224($mapParameters;"centerLatitude")-->
<!--#4DENDIF-->
<!--#4DEVAL $centerLongitude:=1-->
<!--#4DIF (OB Is defined:C1231($mapParameters;"centerLongitude"))-->
<!--#4DEVAL $centerLongitude:=OB GET:C1224($mapParameters;"centerLongitude")-->
<!--#4DENDIF-->
var map = L.map('map').setView([<!--#4DHTML $centerLatitude-->,<!--#4DHTML $centerLongitude-->],6);
L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
attribution: 'copyright',
maxZoom: 18
}).addTo(map);
L.marker([<!--#4DHTML $centerLatitude-->,<!--#4DHTML $centerLongitude-->]).addTo(map);
パラメーターオブジェクトから値
をローカル変数に代?
デフォルト緯度 : 46°
C1224 : C = コマンド,
1224 = 識別番号
Lea?et_Demo11
centerLatitudeがあれば使?する
exchanging parameters
<!--#4DEVAL $mapParameters:=$1-->
<!--#4DEVAL $centerLatitude:=46-->
<!--#4DIF (OB Is defined:C1231($mapParameters;"centerLatitude"))-->
<!--#4DEVAL $centerLatitude:=OB GET:C1224($mapParameters;"centerLatitude")-->
<!--#4DENDIF-->
<!--#4DEVAL $centerLongitude:=1-->
<!--#4DIF (OB Is defined:C1231($mapParameters;"centerLongitude"))-->
<!--#4DEVAL $centerLongitude:=OB GET:C1224($mapParameters;"centerLongitude")-->
<!--#4DENDIF-->
var map = L.map('map').setView([<!--#4DHTML $centerLatitude-->,<!--#4DHTML $centerLongitude-->],6);
L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
attribution: 'copyright',
maxZoom: 18
}).addTo(map);
L.marker([<!--#4DHTML $centerLatitude-->,<!--#4DHTML $centerLongitude-->]).addTo(map);
パラメーターオブジェクトから値
をローカル変数に代?
デフォルト緯度 : 46°
C1224 : C = コマンド,
1224 = 識別番号
タグ変換でコードを?成
Lea?et_Demo11
centerLatitudeがあれば使?する
generic map
Lea?et_Demo12
generic map
Lea?et_Demo12
generic map
Lea?et_Demo12
generic map
Lea?et_Demo12
generic map
Lea?et_Demo12
generic map
Lea?et_Demo12
generic map
Lea?et_Demo12
var map = L.map('map')
.setView([<!—#4DHTML $1-->,<!--#4DHTML $2-->], 6);
L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
attribution: 'copyright',maxZoom: 18
}).addTo(map);
var points = <!--#4DHTML $3-->;
for (var i=0;i<points.length;i++){
L.marker([points[i].Latitude,
points[i].Longitude]).addTo(map);
};
generic map
Lea?et_Demo12
var map = L.map('map')
.setView([<!—#4DHTML $1-->,<!--#4DHTML $2-->], 6);
L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
attribution: 'copyright',maxZoom: 18
}).addTo(map);
var points = <!--#4DHTML $3-->;
for (var i=0;i<points.length;i++){
L.marker([points[i].Latitude,
points[i].Longitude]).addTo(map);
};
generic map
Lea?et_Demo12
to go further…
to go further…
semicircle plugin
Lea?et_Demo13
semicircle plugin
<script src=/slideshow/leaflet-64146985/64146985/"<!-- url_Relative-->/semicircle.js"></script>
Lea?et_Demo13
semicircle plugin
<script src=/slideshow/leaflet-64146985/64146985/"<!-- url_Relative-->/semicircle.js"></script>
L.circle([c.lat,c.lng],c.radius,
{
color: c.arcs[i].color,
weight: 0,
fillOpacity: 0.5,
startAngle: c.arcs[i].start,
stopAngle: c.arcs[i].end
})
Lea?et_Demo13
semicircle plugin
<script src=/slideshow/leaflet-64146985/64146985/"<!-- url_Relative-->/semicircle.js"></script>
L.circle([c.lat,c.lng],c.radius,
{
color: c.arcs[i].color,
weight: 0,
fillOpacity: 0.5,
startAngle: c.arcs[i].start,
stopAngle: c.arcs[i].end
})
Lea?et_Demo13

More Related Content

More from kmiyako (20)

PDF
Code Optimisation
kmiyako
?
PDF
Auto Update
kmiyako
?
PDF
Classic Query Editor
kmiyako
?
PDF
Web area-phone-home
kmiyako
?
PDF
MONET研究会 #14
kmiyako
?
PDF
4d
kmiyako
?
PDF
初心者からプロフェッショナルまで~データベース开発ソフト4顿の魅力を彻底绍介~
kmiyako
?
PDF
Xslt
kmiyako
?
PDF
Journaling slides
kmiyako
?
PDF
Unicode-v11-5
kmiyako
?
PDF
Unicode-v11-0
kmiyako
?
PDF
アップグレードセミナー
kmiyako
?
PDF
4D Write Pro
kmiyako
?
PDF
ハ?ックアッフ?と復元
kmiyako
?
PDF
?本语全?検索
kmiyako
?
PDF
?解像度テ?ィスフ?レイ
kmiyako
?
PDF
ラヘ?ルエテ?ィター
kmiyako
?
PDF
リストフォーム?改造
kmiyako
?
PDF
正しいクエリの书き?
kmiyako
?
PDF
カスタマイス?て?きる?力画面
kmiyako
?
Code Optimisation
kmiyako
?
Auto Update
kmiyako
?
Classic Query Editor
kmiyako
?
Web area-phone-home
kmiyako
?
MONET研究会 #14
kmiyako
?
初心者からプロフェッショナルまで~データベース开発ソフト4顿の魅力を彻底绍介~
kmiyako
?
Xslt
kmiyako
?
Journaling slides
kmiyako
?
Unicode-v11-5
kmiyako
?
Unicode-v11-0
kmiyako
?
アップグレードセミナー
kmiyako
?
4D Write Pro
kmiyako
?
ハ?ックアッフ?と復元
kmiyako
?
?本语全?検索
kmiyako
?
?解像度テ?ィスフ?レイ
kmiyako
?
ラヘ?ルエテ?ィター
kmiyako
?
リストフォーム?改造
kmiyako
?
正しいクエリの书き?
kmiyako
?
カスタマイス?て?きる?力画面
kmiyako
?

Leaflet