biodiv / anycluster

Server-side clustering of map markers for (Geo)Django

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Demo is not running

pcaro opened this issue · comments

Files missing:

  • OpenLayers.js
  • infobox_packed.js
  • markerwithlabel_packed.js

Unfortunately, the demo is way behind the code. infobox_packed.js and markerwithlabel_packed.js have been replaced with inhouse code, and IIRC the syntax also changed (e.g. geojson support). I (or someone else) will have to update the demo.

A simple fix for demo (openlayers not running only google map)

diff --git a/anycluster/MapTools.py b/anycluster/MapTools.py
index 97b41e6..ed8b240 100644
--- a/anycluster/MapTools.py
+++ b/anycluster/MapTools.py
@@ -1,7 +1,6 @@
 from django.contrib.gis.gdal import SpatialReference, CoordTransform, SRSException
 from django.contrib.gis.geos import Point
 import math
-import pyproj


 class MapTools():


diff --git a/demo/anymap/templates/base.html b/demo/anymap/templates/base.html
index 9373f28..a325a4a 100644
--- a/demo/anymap/templates/base.html
+++ b/demo/anymap/templates/base.html
@@ -1,14 +1,14 @@
 {% load staticfiles %}
 <html>
        <head>
-               <script type="text/javascript" src="{% static 'anycluster/OpenLayers.js' %}"></script>
+
                <script type="text/javascript"
                          src="https://maps.googleapis.com/maps/api/js?v=3.8&key=AIzaSyC7zFb7ymHd59HbHYcAld46OcF93OkjD9s&sensor=false">
                </script>
                <script type="text/javascript" src="{% static 'anycluster/anycluster.js' %}"></script>
+               <script type="text/javascript" src="{% static 'anycluster/anycluster_marker.js' %}"></script>
                <script type="text/javascript" src="{% static 'anycluster/django_ajax_csrf.js' %}"></script>
-               <script type="text/javascript" src="{% static 'anycluster/infobox_packed.js' %}"></script>
-               <script type="text/javascript" src="{% static 'anycluster/markerwithlabel_packed.js' %}"></script>
+
                <script type="text/javascript">

thanks! changes included