Re: [Django] #11634: OpenLayers default position

8 views
Skip to first unread message

Django

unread,
Oct 9, 2015, 7:10:47 PM10/9/15
to django-...@googlegroups.com
#11634: OpenLayers default position
--------------------------+------------------------------------
Reporter: dalkvist | Owner: nobody
Type: Bug | Status: new
Component: GIS | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 1 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------+------------------------------------

Comment (by timgraham):

Claude, could you confirm there is value in keeping this ticket open given
it hasn't seen activity in 6 years?

--
Ticket URL: <https://code.djangoproject.com/ticket/11634#comment:6>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Oct 10, 2015, 8:35:03 AM10/10/15
to django-...@googlegroups.com
#11634: OpenLayers default position
--------------------------+------------------------------------
Reporter: dalkvist | Owner: nobody
Type: Bug | Status: new
Component: GIS | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 1 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------+------------------------------------

Comment (by claudep):

The reporter was right and the issue might still be accurate (we have some
similar center conversion code in OLMapWidget.js).

However, I'm not so much interested in fixing this, as I'd like to see
openlayer.js disappear. But that would mean deprecating `GeoModelAdmin` as
a whole and I'm not sure we can do this now without loosing some
functionalities.

--
Ticket URL: <https://code.djangoproject.com/ticket/11634#comment:7>

Django

unread,
Aug 25, 2021, 3:42:17 AM8/25/21
to django-...@googlegroups.com
#11634: OpenLayers default position
----------------------------------+------------------------------------
Reporter: Mattias Dalkvist | Owner: nobody
Type: Bug | Status: new
Component: GIS | Version: dev

Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 1 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
----------------------------------+------------------------------------

Comment (by rlaager):

Since I marked #11094 as a duplicate of this one, I wanted to copy over
this work-around that might be useful to people (as it was for me):

[https://code.djangoproject.com/ticket/11094?replyto=4#comment:4 jbronn
wrote in #11094 comment 4]:
> The `default_lon` and `default_lat` are not working for you because
`OSMGeoAdmin` uses a different projection system than `GeoModelAdmin`.
Specifically, `OSMGeoAdmin` uses the so-called "Google" projection
(SRID=900913) and `GeoModelAdmin` uses WGS84 (SRID=4326). As such, just
transform your `default_lon` and `default_lat` values to 900913:
> {{{
> >>> from django.contrib.gis.geos import Point
> >>> pnt = Point(lon, lat, srid=4326)
> >>> pnt.transform(900913)
> >>> default_lon, default_lat = pnt.coords
> }}}

These days, I would use 3857 instead of 900913 in the .transform().

--
Ticket URL: <https://code.djangoproject.com/ticket/11634#comment:8>

Django

unread,
Sep 17, 2021, 3:38:04 AM9/17/21
to django-...@googlegroups.com
#11634: OpenLayers default position
----------------------------------+------------------------------------
Reporter: Mattias Dalkvist | Owner: nobody
Type: Bug | Status: closed
Component: GIS | Version: dev
Severity: Normal | Resolution: invalid

Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 1 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
----------------------------------+------------------------------------
Changes (by Mariusz Felisiak):

* status: new => closed
* resolution: => invalid


Comment:

`GeoModelAdmin` and `OSMGeoAdmin` are deprecated (see
4555aa0a489cb9dcf764edf12339097cdfa5ff84).

--
Ticket URL: <https://code.djangoproject.com/ticket/11634#comment:9>

Reply all
Reply to author
Forward
0 new messages