... the user friendly GPS tool


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
modified routeconverter.html
#1
Hi,

I updated the routeconverter.html to display better in Linux and MacOSX. As I don't know yet how you want your patches/diffs delivered, and the svn checkout resulted in an error, I uploaded the complete html as gzip to my website (gzip otherwise the browser wants to open the html).
You can find it here.

I used a "jar uf .." with correct jarfile and path.

What does it solve (at least for me):
Linux (Ubuntu 9.10 32bit):
- Map is displayed in the full map window instead of only the top 40 pixels (which was the same height as the contextmenu. IE bugfix generates another bug on linux).
- Dragging and zooming works correctly.

MacOSX:
- Map is now displayed full-size in the map pane and "behaves" correctly.
- Map coordinates are now correct.

Note: I did not test on windows as that's my "work" laptop and doesn't contain jar.

Edit:
- I added the new 3D zoomslider. You can set that back to the old 2D one off course.
- I set the new startpoint of the map to Greenwich.
- I set the initial zoomlevel to 3 instead of 2. 2 is too far zoomed out and gives only a partial map with coordinates problems.
Reply
#2
This was not the final solution either.
When loading routes from the Browse pane, they were not displayed anymore.

I went back to a more conservative setup. I uploaded a new version of routeconverter.html at 20:30 CET which you can still find here.
It works and displays well in OSX and linux (prerelease versons) and displays the directions correctly when loaded from the Browse pane.
Reply
#3
(31.05.2010, 13:16)hvdwolf Wrote: I updated the routeconverter.html to display better in Linux and MacOSX. As I don't know yet how you want your patches/diffs delivered,

I prefer unified diff patches.

(31.05.2010, 13:16)hvdwolf Wrote: and the svn checkout resulted in an error,

If the error was that an svn:external reference could not be followed: ignore it. It's a private repository of test files that is only needed for integration tests.

(31.05.2010, 13:16)hvdwolf Wrote: What does it solve (at least for me):
[..]
Note: I did not test on windows as that's my "work" laptop and doesn't contain jar.

Good work. Basically it was just one line

Quote:--- mapview/src/main/resources/slash/navigation/converter/gui/mapview/routeconverter.html (revision 1739)
+++ mapview/src/main/resources/slash/navigation/converter/gui/mapview/routeconverter.html (revision )
@@ -15,7 +15,7 @@
ondragenter="return false;" ondragover="return false;"
ondrop="return false;">
<div id="error"></div>
-<div id="map"></div>
+<div id="map" style="position:absolute; top:0px;left:0px; width: 99%; height: 99%;"></div>
<div id="directions"></div>
<script type="text/javascript">
function getTileUrlMapnik(a, b) {

and it works on Windows, too.

(31.05.2010, 13:16)hvdwolf Wrote: Edit:
- I added the new 3D zoomslider. You can set that back to the old 2D one off course.
- I set the new startpoint of the map to Greenwich.
- I set the initial zoomlevel to 3 instead of 2. 2 is too far zoomed out and gives only a partial map with coordinates problems.

That was:

map.addControl(new GLargeMapControl3D());
map.setCenter(new GLatLng(52.47, 5.1), 3);

I'm unsure about these changes. I intentionally choose the coordinates such that America and Europe are visible. And the 3D slider looks nice but if different from the look of the map type chooser.
--
Christian
Reply
#4
(01.06.2010, 07:22)routeconverter Wrote: I prefer unified diff patches.
OK, next time it will be a unified diff.

(01.06.2010, 07:22)routeconverter Wrote:
(31.05.2010, 13:16)hvdwolf Wrote: and the svn checkout resulted in an error,

If the error was that an svn:external reference could not be followed: ignore it. It's a private repository of test files that is only needed for integration tests.
I think that was the error. As I didn't know (or wanted to check) what was missing I just skipped it.

(01.06.2010, 07:22)routeconverter Wrote: Good work. Basically it was just one line
The second version was. The first incorrect version wasn't. My javascript skills are 10 years old.


(01.06.2010, 07:22)routeconverter Wrote: That was:

map.addControl(new GLargeMapControl3D());
map.setCenter(new GLatLng(52.47, 5.1), 3);

I'm unsure about these changes. I intentionally choose the coordinates such that America and Europe are visible. And the 3D slider looks nice but if different from the look of the map type chooser.

That's fine with me. That's also why I left the original values in as remarks. Please revert to the previous settings if you like. However, I would stick to the zoom factor 3 or maybe 2.5 (didn't check that value though). Maybe it's even nicer to make that a preference: a user can than select his/her own location with zoom level, like google maps does as well. I think a general super zoomed out map isn't useful, but you have to start somewhere off course.
Reply
#5
(01.06.2010, 10:29)hvdwolf Wrote: I think a general super zoomed out map isn't useful, but you have to start somewhere off course.

Of course not, but as a North America you need to scroll from Europe to your region.... isn't nice either, or?
--
Christian
Reply
#6
(01.06.2010, 12:52)routeconverter Wrote:
(01.06.2010, 10:29)hvdwolf Wrote: I think a general super zoomed out map isn't useful, but you have to start somewhere off course.

Of course not, but as a North America you need to scroll from Europe to your region.... isn't nice either, or?

No it's not and I fully understand your choice. That's why I tried to sneak in a "feature request":
Let a user "move" to his/her preferred location and add a button (or so): "Make current map location my start location", or "Set current map location as "home" location".
Reply
#7
(01.06.2010, 12:59)hvdwolf Wrote: No it's not and I fully understand your choice. That's why I tried to sneak in a "feature request":
Let a user "move" to his/her preferred location and add a button (or so): "Make current map location my start location", or "Set current map location as "home" location".

Sorry... I'm notorious for disliking buttons and options. How about a text field where you can type text which is geocoded and the location played on the map? As a replacement for the Tools/Geocode... dialog?
--
Christian
Reply
#8
(01.06.2010, 13:26)routeconverter Wrote:
(01.06.2010, 12:59)hvdwolf Wrote: No it's not and I fully understand your choice. That's why I tried to sneak in a "feature request":
Let a user "move" to his/her preferred location and add a button (or so): "Make current map location my start location", or "Set current map location as "home" location".

Sorry... I'm notorious for disliking buttons and options. How about a text field where you can type text which is geocoded and the location played on the map? As a replacement for the Tools/Geocode... dialog?

OK, fair enough. I could have a look at the "contextmenucontrol.js" and make it an option in the "right-click" context menu like displayed in the attached png.

Edit: Off course I should learn to type in advance Smile


Attached Files Thumbnail(s)
   
Reply
#9
(01.06.2010, 19:28)hvdwolf Wrote:
routeconverter Wrote:Sorry... I'm notorious for disliking buttons and options. How about a text field where you can type text which is geocoded and the location played on the map? As a replacement for the Tools/Geocode... dialog?

OK, fair enough. I could have a look at the "contextmenucontrol.js" and make it an option in the "right-click" context menu like displayed in the attached png.

Good idea! So you would avoid a menu bar entry? And you didn't like my idea to replace the Tools/Geocode dialog and make searching on the map (and finding your home) easier?
--
Christian
Reply
#10
(02.06.2010, 07:22)routeconverter Wrote: And you didn't like my idea to replace the Tools/Geocode dialog and make searching on the map (and finding your home) easier?
I don't get a "Tools/Geocode" dialog. When I select "Tools->Geocode position...", nothing happens.
I think your idea is better as it will keep the javascript simpler. You are the java expert which makes it easier to implement this then via javascript where the knowledge is not huge within this forum (to my understanding. I don't want to offend anybody here).
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)