documenting /src/viewer/map_marker.js

1 view
Skip to first unread message

agent marmorkuchen

unread,
Mar 23, 2009, 2:34:02 PM3/23/09
to groundcrew-vie...@googlegroups.com
good day everyone...

looking at /src/viewer/map_marker.js:

- rename iw_marker to mapwindow_marker?

- for_agent/for_city there seems to be an inconsistency similar to
set_item/_city in viewer.js, namely one taking a city id and the other
an agent object to do more or less the same thing. is it for the same
(complicated) reason as before?

cheers,
marmorkuchn
--
_ ascii ribbon campaign .oOo. GCSd-s:+aC++ULB+++W++M+PS+++Y+
( )
X Jeden Tag eine Erisische Tat!
/ \

agent marmorkuchen

unread,
Mar 23, 2009, 2:55:05 PM3/23/09
to groundcrew-vie...@googlegroups.com
a little addendum wrt MarkerManager:

- does it make sense to consider map_marker to be an extension of
MarkerManager and hence arrange stuff accordingly?


* agent marmorkuchen <marmor...@kodeaffe.de> [2009-03-23 14:48 -0400]:


>
> looking at /src/viewer/map_marker.js:
>
> - rename iw_marker to mapwindow_marker?
>
> - for_agent/for_city there seems to be an inconsistency similar to
> set_item/_city in viewer.js, namely one taking a city id and the other
> an agent object to do more or less the same thing. is it for the same
> (complicated) reason as before?

--
_ ascii ribbon campaign .oOo. GCSd-s:+aC++ULB+++W++M+PS+++Y+
( )

X C:\>net user administrator Dein_neues_Passwort_hehe
/ \

Joe Edelman

unread,
Mar 23, 2009, 8:37:16 PM3/23/09
to groundcrew-vie...@googlegroups.com
This whole file is obsolete, sort of. What I did was I changed the way
to put markers on the map, after I implemented agents and cities and
before I implemented landmarks. The "right" way is the way it's done
with landmarks: using a separate layer managed by a marker manager,
initted with the map_init trigger, and updated as the map moves and
cities change. This approach (used with landmarks) is efficient enough
to handle hundreds of thousands of agents! It also has the advantage
that layers can be disabled and enabled, so we can add arbitrary map
layers very easily.

Except that agents don't use it yet. In the future I (or you!) will
reimplement map_markers as two files, map_agents.js and map_cities.js,
and they won't be in the src/viewer directory anymore, but rather under
components/main (or whatever it is renamed to by then).

--Joe

--
J.E. -- http://nxhx.org -- 413.250.8007
Reply all
Reply to author
Forward
0 new messages