﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
21606	OSMWidget overrides map position passed to widget constructor	jgoclawski	jgoclawski	"When you pass `default_lon` or `default_lat` in `attrs` dictionary to `OSMWidget` constructor, it doesn't work as expected. Passed values are overriden by those fixed in the `OSMWidget` class.

The defaults are: `default_lon = 5`, `default_lat = 47` and you cannot change them, unless you create a a new widget class derived from `OSMWidget`.

Example:

If you want to set e.g. `map_width`, you can do this with the `BaseGeometryWidget`:


{{{
coordinates = forms.PointField(widget=widgets.BaseGeometryWidget(
    attrs={'map_width': 100}
))
}}}

and it is used instead of default '''600''' value declared in `BaseGeometryWidget`.

But if you wanted to set `OSMWidget`'s default_lon or default_lat, you would expect this should work:


{{{
coordinates = forms.PointField(widget=widgets.OSMWidget(
    attrs={'default_lon': 11,
           'default_lat': 12}
))
}}}

Well... it doesn't work. You will get a map rendered with `default_lon = 5`, `default_lat = 47`.


I'm preparing a GitHub pull request solving this issue."	Bug	closed	GIS	1.6	Normal	fixed	gis, osmwidget		Ready for checkin	1	0	0	0	0	0
