Posted December 10, 2015 Well, the steps will vary depending on how you try to do it.. most importantly, where you are putting your files. The important settings for you to change are in config.json file You'll need to give it the full path of the serverDirectory (which you get from Citadel and place somewhere on your hard drive) You'll need to give it the exact name of the "map" or "server" Set showDeeds: false (I doubt you will be able to reach the RMI port on Citadel to access this feature) a. Create a folder called "mapdumps" b. extract the above map viewer files into the mapdumps/ folder c. Download your custom server folder from Citadel and put it in mapdumps/ folder d. Configure d. open command prompt and run "java -jar mapviewer.jar" e. It should generate files and quit. If it doesn't most likely, the directory paths are incorrect, \\ should be used in stead of / (for Windows) Are you able to capture any errors to help with this? It does require a basic understanding of command line / folder paths Share this post Link to post Share on other sites
Posted December 14, 2015 Should it work with modified RMI files (webinterface.class) ? I`m use WUAdmin (it require modified files), and i like to use your very nice map viewer but - i cant see deeds... it tell everytime - NotBound but WUAdmin working... Share this post Link to post Share on other sites
Posted December 15, 2015 ^ This likely got broken by the most recent patch. WUAdmin is also not working correctly since then because of a critical change in the WU server software. Share this post Link to post Share on other sites
Posted December 16, 2015 As WUAdmin working and my server version not updated (i dislike autoupdates) i dont think so. Share this post Link to post Share on other sites
Posted December 16, 2015 (edited) It won't work with anything that modifies the existing RMI interface, not much I can do about that :/ Edit: Actually you *might* be able to get it working by also replacing the WebInterface class in mapviewer.jar with the modified one as well, as long as it hasn't changed the methods for retrieving deed info. Edited December 16, 2015 by Jonneh Share this post Link to post Share on other sites
Posted December 16, 2015 Replaced your webinterface.class with one from WUAhelper https://github.com/PrabhdeepSingh/WUAHelper text of error changed from NotBound to NotBoundExpection but it not working. Share this post Link to post Share on other sites
Posted December 21, 2015 Thanks for this @Jonneh, great and simple wee map. Got a version of it running here: http://kangawu.com.au/map/ Share this post Link to post Share on other sites
Posted February 7, 2016 Hello, I am rather new to Wurm Unlimited, but I am an experienced software developer. While I like this web app, I found a few ways to improve it. Change log: I added 2 variables to keep track of the min and max zoom. I saw in your code that you were awkwardly checking for the min and max zoom. Just use these variables for that. I added gotoCoordinate for 2 reasons: 1) I hope that it may be used in a HUD mini-map mod (though some things may need to change depending on implementation) 2) it is useful for debugging. Now for the biggest addition... Player tracking. If you can pass up at least the x,y coordinates of each player on the server and have it call updatePlayers with JSON serialized data, then you have player tracking. To make this work for real, you will need to add another canvas at the same html level as "<canvas id="map"></canvas>" in "index.html". Give the new canvas a higher z-index than the map canvas. Now you have an overlay! (This trick can also be used for other sorts of tracking such as boats by giving them their own canvas layer.) I'll let you decide where the renderPlayers() call should go in your code. I picked a fuchsia color because it stands out and isn't already being used from what I could tell. I am passing up player names in my example, but it isn't used in the rendering. I put it there to lay the ground work for future features. If you decide to use this feature, make sure to move permanentPlayerColor to config.js as my comment in the code says. Here are my additions to map.js: // playersContainer is the json container of all the players in the server //{ "players" : [ // { "name":"Player1" , "x":500 , "y":500 } //]} // example: playersContainer.players[i].name var playersContainer; // Zoom values [0.125, 0.25, 0.5, 1, 2, 4, 8, 16] var minZoom = 0.125; var maxZoom = 16; // Move the following line to config.js var permanentPlayerColor = "rgba(255, 0, 255, 1)"; // (inX, inY) is where you want the view to go to // zoomIn is a bool asking if you want to be fully zoomed in function gotoCoordinate(inX, inY, zoomIn) { list.setAttribute("style", "display: none;"); if (zoomIn == true) zoom = maxZoom; x = inX * zoom; y = inY * zoom; update(); } // Takes player data as input then stores/updates it into memory function updatePlayers(jsonData) { playersContainer = JSON.parse(jsonData); } // Renders the current players as a 1x1 fuchsia color function renderPlayers() { var tempPlayers = playersContainer; if (tempPlayers === undefined || tempPlayers.length == 0) { console.log("tempPlayers is empty!"); return; } // playerCanvas would be a canvas overlayed on the map canvas (higher z-index than the map canvas) // Clearing it before redrawing makes sure that the old player locations don't stay on the map. //playerCanvasContext.clearRect(0, 0, playerCanvas.width, playerCanvas.height); for(i = 0; i < tempPlayers.players.length; i++) { ctx.fillStyle = permanentPlayerColor; ctx.fillRect(tempPlayers.players[i].x, tempPlayers.players[i].y, 1, 1); } } Here are the function calls to call the appropriate functions: // Sample data to seed the list of players // DELETE this for deployment var examplePlayerJsonText = '{' + '"players" : [' + '{ "name":"Player1" , "x":500 , "y":500 },' + '{ "name":"Player2" , "x":1000 , "y":1000 },' + '{ "name":"Player3" , "x":1500 , "y":1500 }' + ']}'; // Function calls updatePlayers(examplePlayerJsonText); renderPlayers(); gotoCoordinate(500, 500, true); My goal was to not change any of your existing functions. That way you can plug-and-play with these changes and decide which ones you want to keep. FYI: the code tags on this forum seem to overly extend the indention of tabs. 1 Share this post Link to post Share on other sites
Posted February 9, 2016 Couple quesitons: Where do you add this? Here are the function calls to call the appropriate functions: // Sample data to seed the list of players // DELETE this for deployment var examplePlayerJsonText = '{' + '"players" : [' + '{ "name":"Player1" , "x":500 , "y":500 },' + '{ "name":"Player2" , "x":1000 , "y":1000 },' + '{ "name":"Player3" , "x":1500 , "y":1500 }' + ']}'; // Function calls updatePlayers(examplePlayerJsonText); renderPlayers(); gotoCoordinate(500, 500, true); and second and the code at the top just be added as is to the end of the original map.js file? Share this post Link to post Share on other sites
Posted February 11, 2016 (edited) So I have it going.. but when I go to the map, it's just blue. I tried to run the mapviewer, and it gives me an error at the end in regards to no target sections. Yet, there is a sections folder? INFO: Rendered 96% 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.nio.file.NoSuchFileException: \var\www\pve\mapviewer\sections at sun.nio.fs.WindowsException.translateToIOException(Unknown Source) at sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source) at sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source) at sun.nio.fs.WindowsFileSystemProvider.createDirectory(Unknown Source) at java.nio.file.Files.createDirectory(Unknown Source) at com.wyverngame.mapviewer.MapViewer.save(MapViewer.java:87) at com.wyverngame.mapviewer.MapViewer.main(MapViewer.java:278) ... 5 more Edited February 11, 2016 by Honeysolo Share this post Link to post Share on other sites
Posted February 12, 2016 (edited) On 11/02/2016 at 4:04 AM, Honeysolo said: So I have it going.. but when I go to the map, it's just blue. I tried to run the mapviewer, and it gives me an error at the end in regards to no target sections. Yet, there is a sections folder? INFO: Rendered 96% 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.nio.file.NoSuchFileException: \var\www\pve\mapviewer\sections at sun.nio.fs.WindowsException.translateToIOException(Unknown Source) at sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source) at sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source) at sun.nio.fs.WindowsFileSystemProvider.createDirectory(Unknown Source) at java.nio.file.Files.createDirectory(Unknown Source) at com.wyverngame.mapviewer.MapViewer.save(MapViewer.java:87) at com.wyverngame.mapviewer.MapViewer.main(MapViewer.java:278) ... 5 more If the directory definitely exists it's most likely a permissions problem. Try changing the permission on the directory with the command 'chmod a+wr /var/www/pve/mapviewer/sections'. Edited February 12, 2016 by Jonneh Share this post Link to post Share on other sites
Posted February 12, 2016 5 hours ago, Jonneh said: If the directory definitely exists it's most likely a permissions problem. Try changing the permission on the directory with the command 'chmod a+wr /var/www/pve/mapviewer/sections'. Okay.. got it to compile properly now. But the map is still showing up blue, not showing any land? Share this post Link to post Share on other sites
Posted February 15, 2016 Just released new version. This update has more accurate deed borders, shows bridges and attempts to reload sections that don't load properly. The setup procedure and config file have changed considerably so you'll need to set everything up again (also paths also no longer need slashes to be escaped in the config file). Share this post Link to post Share on other sites
Posted February 16, 2016 Jonneh where is all the RMI info go now? I dont see it in your release. Looks like you changed the config file name. Share this post Link to post Share on other sites
Posted February 16, 2016 (edited) It grabs data directly from the sqlite files now, without using RMI. I'd guess it was changed to support non-square deeds - which RMI doesn't report correctly. Edit: Also bridges, don't think RMI supports that at all. Edited February 16, 2016 by bdew Share this post Link to post Share on other sites
Posted February 16, 2016 42 minutes ago, bdew said: It grabs data directly from the sqlite files now, without using RMI. I'd guess it was changed to support non-square deeds - which RMI doesn't report correctly. Edit: Also bridges, don't think RMI supports that at all. Ok that fixed that part.. Now im getting this at the last step INFO: Saving 3d map 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.lang.OutOfMemoryError: Java heap space at java.awt.image.DataBufferInt.<init>(Unknown Source) at java.awt.image.Raster.createPackedRaster(Unknown Source) at java.awt.image.DirectColorModel.createCompatibleWritableRaster(Unknow n Source) at java.awt.image.BufferedImage.<init>(Unknown Source) at com.wyverngame.mapviewer.Renderer.render(Renderer.java:106) at com.wyverngame.mapviewer.Renderer.save(Renderer.java:205) at com.wyverngame.mapviewer.MapViewer.main(MapViewer.java:40) ... 5 more Thoughts? Share this post Link to post Share on other sites
Posted February 16, 2016 (edited) Nevermind.. this worked: java -Xmn256M -Xms512m -Xmx1024m -jar mapviewer.jar Update: But the map is blank like its not able to read the just the zoom, search box and blue background... GRRRRRRRRRRRR.. Still broken. Edited February 16, 2016 by razoreqx Share this post Link to post Share on other sites
Posted February 16, 2016 44 minutes ago, razoreqx said: Nevermind.. this worked: java -Xmn256M -Xms512m -Xmx1024m -jar mapviewer.jar Update: But the map is blank like its not able to read the just the zoom, search box and blue background... GRRRRRRRRRRRR.. Still broken. Try removing all the files from the old version (the map.js, main.css, index.html etc) and running it again (it should automatically replace them with the new versions). Share this post Link to post Share on other sites
Posted February 16, 2016 (edited) 1 hour ago, Jonneh said: Try removing all the files from the old version (the map.js, main.css, index.html etc) and running it again (it should automatically replace them with the new versions). Interesting enough that worked.. But i found with Firefox it doesnt display the map.. Works fine with IE though. Going to try and purge cache in firefox. Weird.. I'll test with Chrome as well just to update you on browser support.. nice work Jonneh! Append: Firefox worked after I cleared the cache. Chrome worked fine as well. Edited February 16, 2016 by razoreqx Share this post Link to post Share on other sites
Posted February 22, 2016 wow -nice. Small hint: dedicated server with separate user for steamcmd/wurm and www should exceute as root. Share this post Link to post Share on other sites
Posted February 22, 2016 suggestion Possibility to Hide the Resources ... Player should search for it Share this post Link to post Share on other sites
Posted March 13, 2016 I've just set up my own server and the map is showing, with the first deed, but 2 more deeds have been created but their names are not showing on the map - I can see the actual settlements but not the deed names, SHOW_DEEDS = true SHOW_DEED_BORDERS_IN_3D_MODE = true SHOW_DEED_BORDERS_IN_FLAT_MODE = true Any ideas? Share this post Link to post Share on other sites
Posted March 17, 2016 On 13/03/2016 at 8:51 PM, Senitor said: I've just set up my own server and the map is showing, with the first deed, but 2 more deeds have been created but their names are not showing on the map - I can see the actual settlements but not the deed names, SHOW_DEEDS = true SHOW_DEED_BORDERS_IN_3D_MODE = true SHOW_DEED_BORDERS_IN_FLAT_MODE = true Any ideas? You need to re-run the program every time you want to update the map. You can use some kind of task scheduling software such as cron to do this automatically. Share this post Link to post Share on other sites
Posted March 17, 2016 On 2/15/2016 at 8:28 AM, razoreqx said: Interesting enough that worked.. But i found with Firefox it doesnt display the map.. Works fine with IE though. Going to try and purge cache in firefox. Weird.. I'll test with Chrome as well just to update you on browser support.. nice work Jonneh! Append: Firefox worked after I cleared the cache. Chrome worked fine as well. This is a cacheing issue. If you edit the index.html file like it says to on this stackover flow page. You should never run into a cacheing issue again as long as you remember to change the version number every time you make a change. This should probably be added to the actual file that generates the files. <script type="text/javascript" src="data.js"></script> <script type="text/javascript" src="config.js"></script> <script type="text/javascript" src="map.js"></script> Should be <script type="text/javascript" src="data.js?version=1.0.0"></script> <script type="text/javascript" src="config.js?version=1.0.0"></script> <script type="text/javascript" src="map.js?version=1.0.0"></script> Then once the document is changed it would change to <script type="text/javascript" src="data.js?version=1.0.1"></script> <script type="text/javascript" src="config.js?version=1.0.1"></script> <script type="text/javascript" src="map.js?version=1.0.1"></script> This would force any browser to request the file from scratch and continue to cache it until the link changes. Could also generate a random string. More info on this located http://stackoverflow.com/questions/7413234/how-to-prevent-caching-of-my-javascript-file Share this post Link to post Share on other sites