/**************************************************** * leaflet Init ***************************************************/ var map = L.map('map').setView([38.0, 138.9773654], 6); var layer = L.tileLayer( 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', { // attribution: 'Map data © ' + 'OpenStreetMap', attribution: 'Map data © ' + 'OpenStreetMap', maxZoom: 18 } ).addTo(map); var geojsonLayer = L.geoJson(null, {onEachFeature:drawItem}).addTo(map); /**************************************************** * mapping ***************************************************/ function drawItem(feature, layer) { if (!feature.properties) return ; var p = feature.properties; var properties = ''; layer.bindPopup(properties); }