biodiv / anycluster

Server-side clustering of map markers for (Geo)Django
MIT License
106 stars 21 forks source link

Demo is not running #27

Closed pcaro closed 8 years ago

pcaro commented 9 years ago

Files missing:

biodiv commented 9 years ago

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.

pcaro commented 9 years ago

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">
biodiv commented 8 years ago

thanks! changes included