Database Reference
In-Depth Information
thequery,willfeedaLeaflet GeoJSON layerwiththefeaturesfromthesight-
ing PostGIS layer and associate with each feature an informative pop up.
Thispopupwillopenanytimetheuserclicksonapointonthemaprepres-
enting a sighting, displaying the main information for that entity:
<!DOCTYPE html>
<html>
<head>
<title>Wildlife's Sightings</title>
<link rel="stylesheet"
href="http://leafletjs.com/dist/
leaflet.css" />
<script src="http://leafletjs.com/
dist/leaflet.js"></script>
<script
src="http://ajax.googleapis.com/ajax/libs/
jquery/1.9.1/jquery.min.js"></script>
</head>
<body>
<h1>Wildlife's Sightings</h1>
<p>There are {{ sightings.count }}
sightings in the database.</p>
<div id="map" style="width:800px;
height:500px"></div>
<ul>
{% for s in sightings %}
<li><strong>{{ s.animal }}</strong>,
seen in {{ s.country_name }} on
{{ s.date }}
and rated {{ s.rate }}</li>
{% endfor %}
</ul>
<script type="text/javascript">
Search WWH ::




Custom Search