2. 2
Web Map
● Map Database
● Geocoding
● Routing
● Graphical Map Tiles
● Presentation
● Different Styles
● Slippy Map
● modern web maps which
let you zoom and pan
around
Aram Bartholl http://datenform.de/mapeng.html
3. 3
Slippy Map libraries
● Google Maps API
● OpenLayers
● Leaflet
● Mapstraction
Deploying your own Slippy Map - OpenStreetMap Wiki
http://wiki.openstreetmap.org/wiki/Deploying_your_own_Slippy_Map
4. 4
Leaflet
● Extremely lightweight
● 輕薄短小
● 額外功能可以透過 plugin
添加
● Using by OSM.
● No external
dependencies
● Keeps your JS
environment clean
● Features
● Tile layers
● WMS layers
● GeoJSON layers
● Vector layers
● support Mobile Browser
● Pure CSS3 popups and
controls
● 限制
● Custom map projections
* Features - Leaflet - a JavaScript library for mobile-friendly maps
http://leafletjs.com/features.html
6. 6
內政部圖資
var osm = new L.OSM.Mapnik();
var nlscmaps = [
// new L.NLSC.PHOTO2({opacity: 0.7}),
new L.NLSC.B5000({opacity: 0.7}),
new L.NLSC.MB5000({opacity: 0.7}),
new L.NLSC.EMAP0({opacity: 0.7}),
new L.NLSC.EMAP1({opacity: 0.7}),
new L.NLSC.EMAP2({opacity: 0.7}),
new L.NLSC.EMAP({opacity: 0.7}),
new L.NLSC.LANDSECT({opacity: 0.7}),
new L.NLSC.Village({opacity: 0.7}),
new L.NLSC.LUIMAP({opacity: 0.7}),
];
var baseMaps = {};
baseMaps[" 開放街圖 "] = osm;
baseMaps[" 正射影像圖 ( 通用版 )"] = new
L.NLSC.PHOTO2({opacity: 1});
var overlayMaps = {};
for (var i in nlscmaps) {
overlayMaps[nlscmaps[i].name] = nlscmaps[i];
}
// set up the map
var map = new L.Map('map', {
center: new L.LatLng( 25.03738, 121.56351 ),
zoom: 17,
layers: [baseMaps[" 正射影像圖 ( 通用版 )"],
overlayMaps[" 通用版電子地圖透明 "]],
} )
.addControl(new L.Control.Scale())
.addControl(new L.Control.Layers(baseMaps,
overlayMaps));
https://github.com/chihchun/leaflet-tw/blob/master/sample/nlsc.html
8. 8
Render OpenStreetMap Data
● API http://wiki.openstreetmap.org/wiki/API_v0.6
● Download XML data.
● Render library
https://github.com/jfirebaugh/leaflet-osm
● Parsing xml data, and create a vector layer for
leaflet.
13. 13
whodidit
● Changeset as RSS
● List changes by
age
● Search user.
http://zverik.osm.rambler.ru/whodidit/
simon04/whodidit https://github.com/simon04/whodidit
14. 14
A bit hack for chagnelog player
http://chihchun.github.io/party20140215/
https://github.com/chihchun/party20140215
15. 15
Nomination
● tool to search
OSM data by name
and address and to
generate synthetic
addresses of OSM
points (reverse
geocoding)
● format=[html|xml|json|jsonv2]
● Accept-language=
● q=<uqery>
● countrycodes=<countrycode>
● viewbox=<left>,<top>,<right
>,<bottom>
● bounded=[0|1]
* Nominatim - OpenStreetMap Wiki http://wiki.openstreetmap.org/wiki/Nominatim