You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It'd definitely be possible to use a simple object-literal in place of jshashtable - I can definitely run this work out if there's no other-reason for using it that I'm not aware of.
I think the reason for using a hash table is that an Object is keyed on .toString() - which by default is entityType+"."+id, so node.36.
That's ok for most uses, but ids get renumbered on upload - we go from arbitrary negative ids to server-generated positive ids. So if a node had .parents["way.-5"]=true, then this breaks after upload, because that should now be "way.1239867".
But if I've got this wrong (entirely possible) or there's a better way of doing it, then go ahead and convert it. :)
Activity
systemed commentedon Oct 14, 2012
I think the reason for using a hash table is that an Object is keyed on .toString() - which by default is entityType+"."+id, so node.36.
That's ok for most uses, but ids get renumbered on upload - we go from arbitrary negative ids to server-generated positive ids. So if a node had .parents["way.-5"]=true, then this breaks after upload, because that should now be "way.1239867".
But if I've got this wrong (entirely possible) or there's a better way of doing it, then go ahead and convert it. :)
tmcw commentedon Oct 17, 2012
This is addressed in #8, which adds internal IDs for keeping object identity, so we can use a simple object.
tmcw commentedon Oct 19, 2012
Done in the merge.
Live reload documentation
Merge pull request #3 from openstreetmap/develop
Merge pull request #3 from mapilio/username-field-hotfix