--
Ticket URL: <https://code.djangoproject.com/ticket/22357>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0
Comment:
The coordinates are around 39.21512,9.09424
[http://www.openstreetmap.org/search?query=39.2142%2C9.0999#map=16/39.2142/9.0999]
The field is a MultiPolygon.
--
Ticket URL: <https://code.djangoproject.com/ticket/22357#comment:1>
Comment (by babu):
models.py
{{{#!django
from django.contrib.gis.db import models as gis_models
from django.db import models
class County(models.Model):
name = models.CharField(max_length=255, blank=True)
code = models.CharField(max_length=30)
shape = gis_models.MultiPolygonField(blank=True, null=True,
geography=True, srid=4326)
}}}
admin.py
{{{#!django
from django.contrib.gis import admin
admin.site.register(County, admin.OSMGeoAdmin)
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/22357#comment:2>
* ui_ux: 1 => 0
* stage: Unreviewed => Accepted
--
Ticket URL: <https://code.djangoproject.com/ticket/22357#comment:3>
Comment (by reinout):
Your screenshots aren't totally clear as they don't show the full picture.
Probably, in the "right" case the polygon's contents are highlighted and
in the two "wrong" cases the area *around* the polygon is highlighted
instead?
My first thought is about the order in which the polygon's points are
placed. Clockwise or counter-clockwise. In one of the two, the polygon
should be treated as a hole instead of an area.
But... you're using exactly the same database content. So the order of
points cannot have changed. Django's database layer will return the same
result, independent of the browser used.
The problem thus must be in the javascript that renders the map:
openlayers. Django uses openlayers.
Openlayers is loaded with a url:
https://docs.djangoproject.com/en/dev/ref/contrib/gis/admin/#django.contrib.gis.admin.GeoModelAdmin.openlayers_url
, currently http://openlayers.org/api/2.11/OpenLayers.js
I'd say: check if a newer openlayers version still has the problem or if
it is fixed.
To me, this almost cannot be a django problem. I'd suggest closing the
ticket.
--
Ticket URL: <https://code.djangoproject.com/ticket/22357#comment:4>
* status: new => closed
* resolution: => worksforme
Comment:
Closing for inactivity and no similar reports in recent times.
--
Ticket URL: <https://code.djangoproject.com/ticket/22357#comment:5>