Mario8k
unread,Jun 8, 2012, 12:05:02 PM6/8/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to olwidget
Hi,
if i use in the admin, GeoModelAdmin class. There is a way to obtain
the base layer and store it in a baselayer field of the model?
Supose in admin class i put:
class MyAdmin(GeoModelAdmin):
options = {
'layers': ['osm.mapnik','google.streets'],
}
Then, i want to store the value of the layer choosed (with the layer
switcher control), in my model class. This is for use later, when I'm
editing, to remember the previous selection.
class MyModel(models.Model):
circuit = models.LineStringField()
baselayer = models.CharField()
How can i achieve this? any idea? Thanks.