[josm-dev] Seeking input from existing maintainers of JMapViewer/JOSM
Matt Hoover
the.one.eleven at gmail.com
Thu Dec 20 07:46:43 GMT 2012
Hi all,
I am a Java developer (graduate student in CS) looking to contribute to the
JMapViewer open source project. I contacted an openstreetmap sysadmin to
request SVN commit access, and he suggested I get in touch with the current
maintainers of JMapViewer and make sure that my ideas are ok with them. As
he was not sure who those maintainers are, he suggested I instead contact
the JOSM maintainers. As I understand it, JOSM does not actually utilize
JMapViewer, rather it uses SlippyMapChooser, the class on which JMapViewer
was based when it was created. So, it does still make sense to touch base
with the JOSM community, since my changes to JMapViewer could feasibly be
adopted into SlippyMapChooser at some point in the future also. To that
end, here are some examples of the contributions I wish to make:
1) Bug fixes:
-This is a fairly minor issue, but it does irk me for some reason. If the
map grid is slowly scrolled off the screen, the content of the grid tiles
actually blanks out early, before the grid finishes moving to the edge of
the screen. In general, people will have maps centered on their screens so
this shouldn't be a common occurrence. Still, it is a bug.
-The DefaultMapController class contains many options and booleans that can
be assigned through setter methods. However, all available constructors
for the JMapViewer class create an anonymous instance of a
DefaultMapController, making it impossible to use any of these options. It
would seem better to have a map controller as a field of the map viewer,
and the constructor could assign this field... this way whoever creates a
map viewer instance can actually access the controller options.
2) Improvements:
-Adding an option for scroll wrap, so that the map continues wrapping
horizontally across the containing element. This is very easy to implement
but makes a big difference visually IMO.
-Scroll momentum/inertia. This would be an option that would make the map
scrolling behave like it does on all of the popular web mapping services
(including openstreetmap.org!) where if you let go of the mouse button
while still moving the map, the map will "coast" to a graceful stop rather
than just stopping the second you let go of the button.
3) Library cleanup:
-The build.xml file still specifies Java compiler 1.5, however the project
as is won't even compile in 1.5 because it contains annotations that are
only recognized in 1.6 and up! I would update this to 1.6 at a minimum.
-The release folder jar's have not been updated in nearly two years,
despite many updates to the source in that time period.
I am not sure if the bugs/cleanup I refer to in #1 and #3 are applicable to
SlippyMapChooser, but I do think that the improvements I refer to in #2
would be welcomed by some users (as optional settings) in SlippyMapChooser
and JOSM. With that in mind, I should mention that a primary goal of mine,
when adding options to JMapViewer, is to make sure everything still
defaults to previous behavior (from before my changes), so that any
software which calls JMapViewer will be forward compatible with the newer
versions that include my improvements, with no noticeable difference unless
you intend to actually call/change some of the new options.
Please respond with your thoughts. If there are no responses with
objections to me working on the JMapViewer library, I'll let the sysadmin
know, so that I can hopefully get access and begin contributing.
Thanks!
Matt
More information about the josm-dev
mailing list