These maps are sourced from Natural Earth and are in the public domain, so you are free to use them in any way without attribution. <,!DOCTYPE html>, <,html>, <,head>, <,title>,Leaflet GeoJSON Example<,/title>, <,meta charset='utf-8' />, <,link rel='stylesheet' href='http://cdn.leafletjs.com/leaflet-0.7.1/leaflet.css' />, <,style type='text/css'>, .leaflet-container{background-color:#c5e8ff,} <,/style>, <,/head>, <,body>, <,div id='map' style='width: 600px, height: 400px'>,<,/div>, <,script src='http://code.jquery.com/jquery-1.10.2.min.js'>,<,/script>, <,script src='http://cdn.leafletjs.com/leaflet-0.7.1/leaflet.js'>,<,/script>, <,script>, var myGeoJSONPath = 'path/to/mymap.geo.json', var myCustomStyle = { stroke: false, fill: true, fillColor: '#fff', fillOpacity: 1 } $.getJSON(myGeoJSONPath,function(data){ var map = L.map('map').setView([39.74739, -105], 4), L.geoJson(data, { clickable: false, style: myCustomStyle }).addTo(map), }) <,/script>, <,/body>, <,/html>, Source.


Яндекс.Метрика Рейтинг@Mail.ru Free Web Counter
page counter
Last Modified: April 25, 2015 @ 12:00 am