Sign in to follow this  
Jonneh

Online Map Viewer

Recommended Posts

Map Viewer

 

Online map viewer for Wurm Unlimited servers.

Requires Java 8.

 

Download:

Demo:

 

MIT License (see index.html for full terms).

 

9xtEuWg.png

 

Setting up

  1. Extract contents of zip file
  2. Edit the mapviewer.cfg configuration file to reflect your WU & web server setup
  3. Run the map renderer (java -jar mapviewer.jar) (if you want the map to update regularly, set up a cron job or something similar to run this command periodically)
Edited by Saroman
Removed questionable links
  • Like 6

Share this post


Link to post
Share on other sites

If your website uses jQuery...and it does doesnt it?... You should fix scrolling if you embed the map inside an iFrame (to keep your site fluid throughout).

 

Give your Iframe and ID and change #scrollable to your your iframe ID. Add this before the closing body tag of your website (in footer.php for most layouts).

 

Note if you use wordpress or a site with strict jQuery you will need to change the $ to jQuery

 

<script>

$( '#scrollable' ).bind( 'mousewheel DOMMouseScroll', function ( e ) {
var e0 = e.originalEvent,
delta = e0.wheelDelta || -e0.detail;

this.scrollTop += ( delta < 0 ? 1 : -1 ) * 30;
e.preventDefault();
});

</script>

Share this post


Link to post
Share on other sites

Just some thoughts after using the demo:


 


  • Create a few different resolutions for the map to support various zoom levels.
  • Have labels not write on top of other labels. (Look at Down by the River a tad NE from Stronghold)
  • Limit your zooming out to the bounds of the map size vs window size.
  • Cache more than one type of image. The isometric view makes things hard to see, especially with those huge mountains.
  • Like 1

Share this post


Link to post
Share on other sites

This is really cool.

Would it be possible to put an option in to have it render the topo map instead of the top_layer?

Actually it might be nice to have the option to show cave map as well.

Another brief thought. Would it be possible to have an option to display the white light and black light locations on the map too?

This is really great!

Hate to admit it - can't figure out where to either set or retrieve my server's RMI password so I can turn deed visibility on. Anyone able to provide a helpful pointer?

Another cool feature would be the ability to manually add identifying names to the map. Originally I was thinking of Lake names however this functionality could also be used to add things like "Meet here for dragon hunt" to the map as well. Name centered on X,Y coordinates and different colour used for the labels compared to the deed names.

Maybe a simple configuration file with something like this:

X, Y, Name

125, 327, Lake Vanaheim

294, 592, Dragon Hunt Start

645, 972, Valhalla Wildlife Preserve

The work you've already put into this MOD is inspiring (you can likely tell by the enhancement suggestions I am making). Thank-you for making it!

~Nappy

Share this post


Link to post
Share on other sites

One problem we are running into is the map always represents the deeds as square, when hardly ever are deeds square anymore.


Share this post


Link to post
Share on other sites

Hey Nappy,

I had the same problem as you with the RMI password. Not sure exactly what fixed it but after I added

USE_INCOMING_RMI=true

to my wurm.ini and set the Intra server password and server password to the same then listed that in the config.json it started working

 

  • Like 1

Share this post


Link to post
Share on other sites
1 hour ago, Clilesra said:

Hey Nappy,

I had the same problem as you with the RMI password. Not sure exactly what fixed it but after I added

USE_INCOMING_RMI=true

to my wurm.ini and set the Intra server password and server password to the same then listed that in the config.json it started working

 

 

I tried the USE_INCOMING part already but haven't tried the password suggestions. I will give that a try next.

 

Thanks for the helpful advice!

 

~Nappy

Share this post


Link to post
Share on other sites
On ‎11‎/‎21‎/‎2015‎ ‎7‎:‎19‎:‎43‎, Nappy said:

 

I tried the USE_INCOMING part already but haven't tried the password suggestions. I will give that a try next.

 

Thanks for the helpful advice!

 

~Nappy

Ok I was all excited I got it working locally by the above advice then I transferred it to my hosting server and kept getting connection refused. After about an hour I changed the 127.0.0.1 listed in the config.json to the ip listed in the Server Internal IP Address and it worked again.

Share this post


Link to post
Share on other sites

I am trying to set this up on a windows server, it is giving an error on running mapviewer.jar:

 

Spoiler

Exception in thread "main" java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoa
der.java:58)
Caused by: java.rmi.ConnectException: Connection refused to host: 127.0.0.1; nes
ted exception is:
        java.net.ConnectException: Connection refused: connect
        at sun.rmi.transport.tcp.TCPEndpoint.newSocket(Unknown Source)
        at sun.rmi.transport.tcp.TCPChannel.createConnection(Unknown Source)
        at sun.rmi.transport.tcp.TCPChannel.newConnection(Unknown Source)
        at sun.rmi.server.UnicastRef.newCall(Unknown Source)
        at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
        at com.wyverngame.mapviewer.RMIClient.getDeeds(RMIClient.java:17)
        at com.wyverngame.mapviewer.MapViewer.save(MapViewer.java:73)
        at com.wyverngame.mapviewer.MapViewer.main(MapViewer.java:264)
        ... 5 more
Caused by: java.net.ConnectException: Connection refused: connect
        at java.net.DualStackPlainSocketImpl.connect0(Native Method)
        at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source)
        at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
        at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)
        at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
        at java.net.PlainSocketImpl.connect(Unknown Source)
        at java.net.SocksSocketImpl.connect(Unknown Source)
        at java.net.Socket.connect(Unknown Source)
        at java.net.Socket.connect(Unknown Source)
        at java.net.Socket.<init>(Unknown Source)
        at java.net.Socket.<init>(Unknown Source)
        at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(Unknown S
ource)
        at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(Unknown S
ource)
        ... 13 more

 

I can not understand what it is trying to tell me but it looks like it is not making a connection.

Here is my config.json

Spoiler

{
    "serverDirectory": "c:\Program Files (x86)\Steam\steamapps\common\Wurm Unlimited Dedicated Server",
    "mapName": "EverWurm",
    "mapViewerDirectory": "c:\Users\Gamer\Desktop\mapviewer\www",
    "sectionSize": 256,
    "fileType": "png",
    "showDeeds": true,
    "rmiHost": "127.0.0.1",
    "rmiPort": 7220,
    "rmiPassword": "******"
}

 

 

I verified the rmiPassword from the area of the rim port section labelled intra server password, is this the right one?

 

Thank you for any help you can offer.

Share this post


Link to post
Share on other sites
On 26/11/2015, 4:43:04, Kalek said:

I am trying to set this up on a windows server, it is giving an error on running mapviewer.jar:

 

  Reveal hidden contents

Exception in thread "main" java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoa
der.java:58)
Caused by: java.rmi.ConnectException: Connection refused to host: 127.0.0.1; nes
ted exception is:
        java.net.ConnectException: Connection refused: connect
        at sun.rmi.transport.tcp.TCPEndpoint.newSocket(Unknown Source)
        at sun.rmi.transport.tcp.TCPChannel.createConnection(Unknown Source)
        at sun.rmi.transport.tcp.TCPChannel.newConnection(Unknown Source)
        at sun.rmi.server.UnicastRef.newCall(Unknown Source)
        at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
        at com.wyverngame.mapviewer.RMIClient.getDeeds(RMIClient.java:17)
        at com.wyverngame.mapviewer.MapViewer.save(MapViewer.java:73)
        at com.wyverngame.mapviewer.MapViewer.main(MapViewer.java:264)
        ... 5 more
Caused by: java.net.ConnectException: Connection refused: connect
        at java.net.DualStackPlainSocketImpl.connect0(Native Method)
        at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source)
        at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
        at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)
        at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
        at java.net.PlainSocketImpl.connect(Unknown Source)
        at java.net.SocksSocketImpl.connect(Unknown Source)
        at java.net.Socket.connect(Unknown Source)
        at java.net.Socket.connect(Unknown Source)
        at java.net.Socket.<init>(Unknown Source)
        at java.net.Socket.<init>(Unknown Source)
        at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(Unknown S
ource)
        at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(Unknown S
ource)
        ... 13 more

 

I can not understand what it is trying to tell me but it looks like it is not making a connection.

Here is my config.json

  Reveal hidden contents

{
    "serverDirectory": "c:\Program Files (x86)\Steam\steamapps\common\Wurm Unlimited Dedicated Server",
    "mapName": "EverWurm",
    "mapViewerDirectory": "c:\Users\Gamer\Desktop\mapviewer\www",
    "sectionSize": 256,
    "fileType": "png",
    "showDeeds": true,
    "rmiHost": "127.0.0.1",
    "rmiPort": 7220,
    "rmiPassword": "******"
}

 

 

I verified the rmiPassword from the area of the rim port section labelled intra server password, is this the right one?

 

Thank you for any help you can offer.

 

I had the same problem. It didn't want to work using 127.0.0.1 but started working as soon as I changed

 

"rmiHost": "127.0.0.1",

 

to the address I had in internal server ip address in the server settings.

 

Hope that helps.

Share this post


Link to post
Share on other sites

I noticed the nearly last line in the dos box when starting the server, right before the 'connected to steam' it says...

 

Internal RMI disabled ( or something very similar ), any idea what that is?

Share this post


Link to post
Share on other sites

The new patch today broke your map reader  Its no longer reading the RMI correctly to add deed names to the map.   Ive had this working since you released it. 

 

Changed files from todays patch if that helps.

 

http://pastebin.com/R1BGs1KV

 

 

Edited by razoreqx

Share this post


Link to post
Share on other sites

Just updated, latest version should now work with the new changes to RMI.

  • Like 1

Share this post


Link to post
Share on other sites
1 hour ago, Jonneh said:

Just updated, latest version should now work with the new changes to RMI.

 

 

Tested and working..  You rock!! 

Edited by razoreqx

Share this post


Link to post
Share on other sites

Any way to get this running on a CitadellServers rented Server?

 

Can´t find any /var/www directory, a step by step Guide for rented Servers would be great.

Share this post


Link to post
Share on other sites
2 minutes ago, Caduryn said:

Any way to get this running on a CitadellServers rented Server?

 

Can´t find any /var/www directory, a step by step Guide for rented Servers would be great.

 

Thats the root of your web server.  If your hosting provider does not include a HTTPD or web service this will not work for you.    

Share this post


Link to post
Share on other sites

You could still download your map files from the server periodically, run the .jar, generate the files and upload them to a ftp webserver you setup. You won't be able to live view though with Citadel.

Share this post


Link to post
Share on other sites
57 minutes ago, Trake said:

You could still download your map files from the server periodically, run the .jar, generate the files and upload them to a ftp webserver you setup. You won't be able to live view though with Citadel.

Ok, downloaded the Map Files, but simply run the .jar dosn´t work.

 

It would still be nice to get a clear Step by Step Guide.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this