[INFO/WEB] Landmarks v0.2 - with DynMap addon [953]

Discussion in 'Inactive/Unsupported Plugins' started by DFYX, Apr 7, 2011.

  1. Offline

    DFYX

    Landmarks
    Version: v0.2
    Tested with Craftbukkit 953/Dynmap 0.19.1

    [​IMG]

    This plugin lets you define landmarks that will be saved into a JSON file, similar to the old MapMarkers for hMod. I have included a DynMap component that shows those landmarks as little icons on the map.

    [​IMG]
    If you like this, why not donate a few bucks? But don't worry, this plugin will always be free.​

    Features:
    • Set and delete landmarks
    • Display them on a DynMap
    • Full support for multiple worlds
    Download Landmarks 0.2 (Jar only, dynmap component only)
    Source Code
    Older versions: 0.1.1, 0.1

    Commands
    /landmark add <name>
    Set a new landmark to your current position. Name may contain spaces.
    /landmark modify <name>
    Set update an existing landmark to your current position. Name may contain spaces.
    /landmark set <name>
    Shortcut for add or modify depending if there already is a landmark with this name. Name may contain spaces.
    /landmark delete|del|remove <name>
    Remove an existing landmark. Name may contain spaces.

    Permissions
    (All permissions include the rights to use the matching aliases and shortcuts such as /landmark set)
    landmarks.add
    The player may use /landmark add
    landmarks.modify.own
    The player may use /landmark modify on his own markers
    landmarks.modify.all
    The player may use /landmark modify on all markers
    landmarks.remove.own
    The player may use /landmark remove on his own markers
    landmarks.remove.all
    The player may use /landmark remove on all markers

    Planned:
    • List existing landmarks
    • Show information like creator and time (already included in JSON file)
    • Think about priorities or grouping
    • Different icons? Probably larger icons for higher zoom levels.
    • Save display settings in cookies
    Setup:
    1. Just unpack the contents of the zip file into your bukkit folder.
    2. If you want to use the DynMap component:
      1. Go to plugins/Landmarks/config.yml and set markersfile to ../dynmap/web/markers.json
      2. If you have copied your dynmap/web folder to your Apache folder (as described in DynMap's setup instructions), use that path instead or use a symlink
      3. Go to plugins/dynmap/configuration.txt, find "components:" and add the following below it:
        Code:
          - class: org.dynmap.ClientComponent
            type: landmarks
      4. Optional: to display the settings panel, add the following just above what you added in the last step:
        Code:
          - class: org.dynmap.ClientComponent
            type: settings
    There's also a more detailed howto for Linux users below. Thanks, paccer!

    Changelog
    Version 0.2
    • Permissions support
    • New settings panel where people can select if they want to see the markers and marker texts (optional). See setup instructions step 2.4
    • Markers are now automatically removed from dynmap without reloading the page
    • New commands add and modify (they do basically the same as set, but you won't accidentally update an existing marker when you want to add a new one or the other way round)
    • The default config now contains the correct markersfile path for dynmap
    Version 0.1.1
    • Included config.yml and removed markers.json (will be created automatically)
    • Added a 2 pixel semi-transparent white border around the landmark icons
    • No changes to the jar file itself!
     
  2. Offline

    Medalink

    There is no Landmarks/config.yml file. I can't get the markers to show up in Dynmap (I symlinked the file into dynmap/web).

    Console:
    Code:
    04.08 10:00:35 INFO server 1: [Server] INFO [Landmarks] Loading /home/multicraft/servers/MedaCraft/plugins/Landmarks/markers.json
    04.08 10:00:35 INFO server 1: [Server] INFO [Landmarks] Successfully loaded 1 markers.
    04.08 10:00:35 INFO server 1: [Server] INFO [Landmarks] Landmarks 0.1 enabled.


    -Medalink
     
  3. Offline

    DFYX

    Oh, sorry, I included the wrong file in my zip file. I'll fix that in a few minutes.

    Edit:
    Alright, I just uploaded a new zip file that includes a sample config.yml. Just set markersfile to ../dynmap/web/markers.json and make sure that you have the component enabled in your dynmap config.
     
  4. Offline

    overlordror

    I'd like to use this, but your setup instructions are really vague to a newbie admin, so I have no idea what I'm supposed to do or add or how to do it. How would I set up the plugin without using symlink, since I don't have console access? Is that even possible?

    Also, setting up a new component entry in dynmap's config file doesn't tell me what to do. Any help would be greatly appreciated.
     
  5. Offline

    DFYX

    Alright, I've clarified the instructions a little. If you still have questions, feel free to ask.
     
  6. Offline

    overlordror

    Thank you, that's much better. :)
     
  7. Offline

    DFYX

    And even more tips for people who use Apache with that weird alias setup from the DynMap wiki. I don't exactly understand why they don't use an alias for the whole web folder. Works fine for me.
     
  8. Offline

    paccer

    Heres what i did it on my Ubuntu server - Instructions should be similar on most linux servers

    download and install:
    Code:
    wget --no-check-certificate https://github.com/downloads/dfyx/landmarks/Landmarks-0.1.1.zip
    unzip Landmarks-0.1.1.zip
    cp -R plugins bukkit/
    link markers.json
    run server/reload plugins,
    add landmark by entering: /landmark set <name>
    this creates the markers.json
    which i then linked:
    Code:
    ln -s <path to bukkit>/plugins/Landmarks/markers.json <path to bukkit>/plugins/dynmap/web/markers.json
    (not sure if absolute paths is required)

    edit dynmap/configuration.txt
    my components section now looks like this:
    Code:
    components:
          - type: landmarks
          - type: chat
          - type: chatballoon
            focuschatballoons: false
          - type: chatbox
            showplayerfaces: true
            messagettl: 5
          - type: playermarkers
            showplayerfaces: true
          #- type: digitalclock
          - type: timeofdayclock
            showdigitalclock: true
    
    reload etc

    hope it helps
     
    edocsyl likes this.
  9. Offline

    DFYX

    Always use absolute paths (beginning with / ) for the first parameter of ln -s or stuff might go horribly wrong.
     
  10. Offline

    overlordror

    Hey there!

    Got this working and it's great, but it's hard to read the landmark names sometimes, especially if they're placed over something like sand on the surface map of DynMap. Is there anyway to put a background behind the text similar to what player names have? That would be pretty great.
     
  11. Offline

    DFYX

    Uhm... there should be exactly the same background. Can you send me a link to your dynmap so I can look at it?
     
  12. Offline

    overlordror

    Sure, it's located at 2girls1game.mcreserv.com. No background unfortunately, but maybe I configured something wrong. Seems to be working fine, though.
     
  13. Offline

    DFYX

    Alright, you somehow managed to get an old landmarks.js that was online for like 10 minutes or so. Just install the latest version and it should add the stylesheet just fine.
     
  14. Offline

    overlordror

    Hmm, still seems to be a problem. I downloaded the file and replaced everything, but there is still no background behind the names.
     
  15. Offline

    DFYX

    Your problem starts to get creepy. Your server still sends me the old landmarks.js. I even used wireshark to confirm it's not my browser cache. So there's either some really weird server-side caching going on or you did something terribly wrong. Are you sure you have unpacked the new files in the right location?
     
  16. Offline

    RaymanMaik

    Do I have to do all steps? Or can I choose one? And should I type "../dynmap/web/markers.json" or "/dynmap/web/markers.json" or "<Server dirctory>/plugins/web/markers.json"?
     
  17. The background fails on my map to... http://[link removed]
     
  18. Offline

    harakiwi

    Awesome plugin!

    But i have 2 questions!

    Is that house Icon in the preview picture included?
    Like the other guys i have no background in the landmark-names too.
    But i dont think that's a big problem. i thought about changing the font or text size... but these thingsĀ“are just ideas ;)

    Will it be possible to make the landmarks invisible?
    Because after most of my member realized that new feature some people come up and want to get a clean map w/o the landmarks (and maybe w/o the player names).
    In my tectonicus map is already a feature to hide player and signs. Maybe we can get a similar feature in one of the next versions :D

    Thanks for that wonderful plugin!


    EDIT: Yes the fix did it. Now there are little houses on my map :D Nice!
     
  19. Offline

    blutherz

    thank you for the plugin! works on my ubuntu server very nice! Now i must only teach my son to learn "reading"...

    So perhaps it is possible to make some simple icons on the marks?

    P.S. my son is 6 years and will start end of this year shool so he can't read at moment ;)
     
  20. Offline

    Virtlink

    Also thank you for the plugin! I am using it now. I have the same problem with the icons and the text background, but I think it has something to do with the landmarks.css file not being mentioned in the page source.

    I also have a feature suggestion:
    Would it be possible to set a 'priority level' for each landmark, so that when I zoom the isometric map out, it only displays the priority 4 landmarks, and when I zoom all the way in, it shows all landmarks (priority 4, 3, 2 and 1). This way the map doesn't clutter with landmark names when zoomed out, but still allows you to mark every building in a city because those are visible when zoomed in. For the non-isometric projection, I would suggest it to show landmarks with priority4 and 3 (because it cannot be zoomed).
     
  21. Offline

    DFYX

    Alright, now I'm confused. The image in the first post is an actual screenshot from my server. Except the larger text in the upper right corner of course. I'm running the exact same version you can get from the download link, so something is really weird. Usually the latest version of landmarks.js is supposed to dynamically add the line that includes the stylesheet so you don't have to edit your index.html. The stylesheet includes the house icons and a background behind the text.

    I'll have a closer look tomorrow. I've just come home and I'm rather tired.

    Edit:
    Alright, I found the problem. You may now legally call me blind if you want. Somehow my zip tool put the newer version of the JavaScript file in the wrong place inside the zip. There's one at plugins/dynmap/web/js/landmarks.js (where it should be) and one at plugins/dynmap/js/landmarks.js (where it shouldn't). I'll upload a fixed zip in a few minutes.
     
  22. Offline

    Virtlink

    Thanks for looking into this! It indeed solved the problem!
     
  23. Offline

    DFYX

    Alright, I hope this counts as a valid reason for a double post. I have uploaded a fixed file (wget users: new filename, don't just use the link in your bash history). Please redownload and tell me if it helped.

    Also, at @RaymanMaik:
    Step 1 and 3 are mandatory for everyone. Step 2 is more of an alternative to step 1 for people who use Apache instead of DynMap's internal web server. For the path you can use either "../dynmap/web/markers.json" or "<Server dirctory>/plugins/dynmapweb/markers.json". I prefer the first version because you don't have to change anything if you move or copy your server directory.

    Apache users should set it to "/srv/http/dynmap/markers.json" or whatever applies to them. If you followed the tutorial in the DynMap wiki, you probably know the right path.
     
  24. Thanks for the update and notice on the webchat :D
    works now :)
     
  25. Offline

    MJRamon

    Can you add automatic support to show towns of Towny plugin, home of DefaultCommands plugin and spawn points? Would be great!
     
  26. Offline

    dslip

    Im kinda stuck setting this up. I have no 'components:' line in my dynmap configuration.txt file. here is the config I have that is running my current map.

    configuration.txt
     
  27. Offline

    MatCat

    Anyway to get this to output for other map systems like c10t?
     
  28. Offline

    overlordror

    Oh sweet. Following the information posted, I got my problem fixed with the name background and icons not showing up. Works a lot smoother. Is there any way to make it so that landmarks with multiple words in the name don't wrap at every word? As it is now, landmarks show up like:

    A
    Landmark
    Here

    If that could be a single string limited by characters instead of a space, that would be awesome.
     
  29. Offline

    nubpro

    Source code not working
     
  30. Offline

    Virtlink

    My previous feature request about the landmark priorities is not necessary any more, now that only one name shows up when hovering it. However, I do have the following suggestions:
    • Possibility to select a different icon for a landmark. For example, the default landmark icon would be landmark.png, and if I could set that a landmark's type is for example "Town", it would show landmark_town.png instead. Of course you wouldn't have to draw an image for all possible landmark types. If we server administrators could add types ourselves by setting the landmark's type and adding such an image in the /web/images folder, that would be totally awesome! You could include the top-rated landmark icons made by others in your standard distribution.
    • Possibility to assign an optional URL to a landmark, so that when you hover over the landmark's name and click it, it opens a new tab or window with the specified URL. This could be used to connect informational pages (e.g. Wiki) to the landmarks.
    Thanks for the plugin!
     

Share This Page