Database Reference
In-Depth Information
// OSM layer
var osm =
L.tileLayer('http://{s}.tile.osm.org/{z}/
{x}/{y}.png', {
maxZoom: 18,
attribution: "Data by OpenStreetMap"
});
// map creation
var map = new L.Map('map', {
center: new L.LatLng(15, 0),
zoom: 2,
layers: [osm],
zoomControl: true
});
// add GeoJSON layer
$.ajax({
type: "GET",
url: "geojson",
dataType: 'json',
success: function (response) {
geojsonLayer =
L.geoJson(response, {
style: function (feature) {
return {color:
feature.properties.color};
},
onEachFeature: function
(feature, layer) {
var html = "<strong>" +
feature.properties.animal_name
+ "</strong><br />"
+
feature.properties.animal_image_url
+ "<br
/><strong>Description:</strong> "
+
Search WWH ::




Custom Search