simplegeo / polymaps

Polymaps is a free JavaScript library for making dynamic, interactive maps in modern web browsers.
http://polymaps.org/
Other
1.6k stars 213 forks source link

Many setters have implicit assumptions of state. #3

Open mbostock opened 14 years ago

mbostock commented 14 years ago

For example:

Ideally, all of these should be changed to allow objects to be reconfigured independent of whatever state they are currently in. If that is not possible, the limitations should be clearly documented and an error should be thrown.

mbostock commented 14 years ago

Some of these were fixed in 2.0.3, but not all.

mbostock commented 14 years ago

The layer.id restriction was fixed in 2.1.0.

mbostock commented 14 years ago

More fixes in this commit:

http://github.com/mbostock/polymaps/commit/0cfd05321bffb7492b83db73314c58eef32a3b9b

I think the remaining stateful bugs are limited to:

There's also the issue that url.template and url.hosts can't be changed after add, unless you re-assign the url property on the given layer, or call layer.reload() manually. But I think that's fine.

mbostock commented 14 years ago

And geoJson.clip is now fixed:

http://github.com/mbostock/polymaps/commit/692eb1c45647c4bec8e9dfd1bf2c7d73a4b7e95f

I think the last two will be part of the 3.0 release, since the change from container to parent won't be totally backwards-compatible.