Page 1 of 1

map.html (general minor tip)

PostPosted: Thu Sep 20, 2012 9:26 am
by MvGulik
Using
Code: Select all
var currentSession = ".";
instead of the current default
Code: Select all
var currentSession = 0;
in the general used map.html (for viewing the last map session dump):
Will allow map.html to also be used directly inside a particular (other) map-session folder. (by just dropping a copy of the map.html file from the map-sessions root folder into a specific map-session folder, and running that copy.)
(should also work for a shortcut(windows) to map.html, as long as the working folder in the shortcut is not set.)

[Edits: Title adjust]

Re: map.html (general minor tip)

PostPosted: Thu Sep 20, 2012 6:40 pm
by Un1ted
Nice tip - thanks!

Re: map.html (general minor tip)

PostPosted: Mon Sep 24, 2012 9:07 am
by TotalyMoo
For us tech-retarded people, what does this mean?

Re: map.html (general minor tip)

PostPosted: Mon Sep 24, 2012 9:22 am
by masau
What it essentially means is that you'd be able to just copy map.html into any given map session folder and it would display that map session without having to do anything more. The way it's written now, this isn't possible without some extra effort (to view an older session you'd need to alter the date/time stored in currentSession.txt).

+1 to your suggestion (I'm not entirely sure what generally used map you are referring to though)

Re: map.html (general minor tip)

PostPosted: Mon Sep 24, 2012 9:37 am
by MvGulik
masau wrote:(I'm not entirely sure what generally used map you are referring to though)

(map? ... assuming map.html file here)
The map.html file currently included with APXEOLOG's BDSaleM client setup. Did not see a map.html file coming along with the Ender client (Although I might have overlooked it.).

Re: map.html (general minor tip)

PostPosted: Mon Sep 24, 2012 9:40 am
by masau
That's what I thought you were referring to (it might be worth posting the suggestion in the BDSalem thread), but there's a post with code for an improved map that supports world, session and cave maps somewhere, I think it was in Ender's thread on the paradox forum, but I don't remember for sure. I imagine there are others floating around as well.

Re: map.html (general minor tip)

PostPosted: Mon Sep 24, 2012 1:30 pm
by MvGulik
Aha. Will see if I can find some of those improved map viewers.

Re: map.html (general minor tip)

PostPosted: Mon Sep 24, 2012 5:34 pm
by masau
Here's the post I was talking about

It needs work imo. Waypoints would be nice for the world map for one, and the ability to select session would be very nice as well. But still, the world map is nice - here's a tool (windows/wine only unfortunately) for merging sessions for a world map. I've been thinking about remaking that tool in java so it's cross platform (I use linux and wine is evil) and making a few improvements to it. And improving the map.html file too (though I don't know much about the google maps api).

Re: map.html (general minor tip)

PostPosted: Mon Sep 24, 2012 8:45 pm
by MvGulik
Did already found it, but thanks for the link anyway.
Ow, Cool. Was looking for some Google-map zoom method whiteout the need for separate zoom-images. Although it seems a bit slow on this computer.

I don't use that salem-map-tool map merger ... Don't like Net.

A (automated-merger) in java would be nice.

I do have a (broken) sessions merger done in AutoIt, but I keep getting lost in my own code :roll: . If I get some coding urge back I will go for a python version. ... Is however a big IF at the moment.

Re: map.html (general minor tip)

PostPosted: Mon Sep 24, 2012 10:05 pm
by masau
Alright. I'll work on a java version of that tool later today or tomorrow (babysitting atm). I don't know how automated it can be made though - you'll still need to set the merge point for each of the map sessions. I could in theory do something with a simple checksum to automate it a bit probably. Anything more than that would be too resource intensive to be viable I think.

The reason the zoom is so slow with that map is the tile size - it uses the same tiles for the zoomed out map as for the zoomed in map. That means it's loading hundreds of 100x100 tiles when it should be only loading 20-30. Without separate zoom images it'll always be slow. I'll include an option to export separate zoom images when I get that far though.