Hi,
I have an app that use OSMGeoAdmin (I have the same issue with GeoModelAdmin) as a map instance (outside of the admin) produced with the get_map_widget() method like this:
def getMapForm(shapefile):
geometryField = calcGeometryField(shapefile.geom_type)
adminInstance = admin.OSMGeoAdmin(Feature, admin.site)
field = Feature._meta.get_field(geometryField)
widgetType = adminInstance.get_map_widget(field)
widgetType.params.update({'map_width':1000, 'map_height': 700})
class MapForm(forms.Form):
geometry = forms.CharField(widget=widgetType(), label="")
return MapForm