How do I display a map with GeoDjango models?

55 views
Skip to first unread message

Thomas Levine

unread,
May 13, 2015, 7:36:13 PM5/13/15
to django...@googlegroups.com
I have multiple GeoDjango models (http://dada.pink/scott2/map/models.py)
and want them to be layers on the same map.

Surely there's a magic way to specify this. What do I do?

Derek

unread,
May 14, 2015, 1:52:45 PM5/14/15
to django...@googlegroups.com, _...@thomaslevine.com
Could you not add them as multiple Leaflet layers; each layer pointing to a view for the model in question.  There is a simple overview here:


There is much more detail on the django-leaflet site (e.g. https://github.com/makinacorpus/django-leaflet#default-tiles-layer )

Thomas Levine

unread,
May 14, 2015, 5:57:05 PM5/14/15
to Derek, django...@googlegroups.com
Indeed I can! It looks like I'm going to use Polymaps instead, but the
magic I was looking for was djgeojson.views.TiledGeoJSONLayerView.
I think. It's quite slow, so I might wind up generating them in batch.
Maybe that's why there wasn't such an obvious answer....
Reply all
Reply to author
Forward
0 new messages