OpenLayers 3 ?

41 views
Skip to first unread message

Guillaume

unread,
Aug 27, 2017, 12:03:21 PM8/27/17
to geodjango
Hi,

I'm a quite new Django/GeoDjango user and i wonder if the geodjango release with OL3 would be put in a stable release soon.
Being a GIS Engineer and not a Python/Django developper i also wonder how i can help.

Trying to get more familiar with GeoDjango and to make application prototyprd i faced the following situation : 
- working on the top of OL2 with actual geodjango
- creating my own template with OL3
- waiting for the OL3 to be used by GeoDjango and then work on top of it
- ... or changing for Leaflet

Which solutions are the more followed in the community ?

Best regards,

Guillaume





Claude Paroz

unread,
Aug 27, 2017, 2:54:19 PM8/27/17
to geod...@googlegroups.com
Le 27. 08. 17 à 18:03, Guillaume a écrit :
> Hi,
>
> I'm a quite new Django/GeoDjango user and i wonder if the geodjango
> release with OL3 would be put in a stable release soon.

Hi Guillaume. This is done already, in Django 1.11 (mentioned in the
release notes).
https://docs.djangoproject.com/en/dev/releases/1.11/

> Being a GIS Engineer and not a Python/Django developper i also wonder
> how i can help.
>
> Trying to get more familiar with GeoDjango and to make application
> prototyprd i faced the following situation :
> - working on the top of OL2 with actual geodjango
> - creating my own template with OL3
> - waiting for the OL3 to be used by GeoDjango and then work on top of it
> - ... or changing for Leaflet
>
> Which solutions are the more followed in the community ?

I'm not aware of community polls about library usage.
As for me, I have projects with both OL3 and Leaflet. This choice
depends on developers familiarity and on project specific needs.

It's not possible to say out of the blue which one is the best choice
for you.
By the way, django-leaflet is very nice when working with Leaflet.
https://pypi.python.org/pypi/django-leaflet

Claude
--
www.2xlibre.net

Guillaume M

unread,
Aug 27, 2017, 4:29:16 PM8/27/17
to geod...@googlegroups.com
OK thanks,

I just realized that i looked first at admin widget which still looks OL2 and did not check my forms that are now made of OL3.


Is extra_js a good way to add custom (and simple) map controls to the admin side map widget ? if it is is there such a way to do it in form mapp widget too ?

best regards,

Guillaume



--
You received this message because you are subscribed to a topic in the Google Groups "geodjango" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/geodjango/lpKtfiY4cGs/unsubscribe.
To unsubscribe from this group and all its topics, send an email to geodjango+unsubscribe@googlegroups.com.
To post to this group, send email to geod...@googlegroups.com.
Visit this group at https://groups.google.com/group/geodjango.
For more options, visit https://groups.google.com/d/optout.



--
Guillaume MOCCAND

Claude Paroz

unread,
Aug 29, 2017, 3:05:32 PM8/29/17
to geod...@googlegroups.com
Le 27. 08. 17 à 22:29, Guillaume M a écrit :
> OK thanks,
>
> I just realized that i looked first at admin widget which still looks
> OL2 and did not check my forms that are now made of OL3.
>
> In stable 1.11.X branch in github this source
> https://github.com/django/django/blob/stable/1.11.x/django/contrib/gis/admin/options.py,
> uses :
> https://cdnjs.cloudflare.com/ajax/libs/openlayers/2.13.1/OpenLayers.js

Ah yes, https://code.djangoproject.com/ticket/27674

> Is extra_js a good way to add custom (and simple) map controls to the
> admin side map widget ?

Probably, I'm not using the customized ModelAdmin classes myself.

> if it is is there such a way to do it in form
> mapp widget too ?

Sure, the best way is to make your own widget inheriting from the base
ones. Then you can provide all JS/CSS you want in the class definition.

Claude
--
www.2xlibre.net
Reply all
Reply to author
Forward
0 new messages