[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

    Alex_of_War

    I second that - I'm using dynmap 0.20.1 and haven't been able to get this to work. The configuration panel appears when I first load the map webpage, but then is replaced by player names. Also, can not get landmarks to actually display on the map. Hopefully this will be updated soon. it sounds like an excellent plugin!
    [Edit: I tried deleting the markers.json and installing 0.3 again after reading Ayaron's post, and bam! it now works. Thank you!]
     
  3. Offline

    Ayaron

    I am using dynmap 0.20.1 and I got it working by downloading the 'unofficial' 0.3 Landmarks release FrozenCow linked to above, unzipping it in my plugins folder, overwriting all the existing components in both Landmarks and dynmap with the new ones. And bingo, it shows the little houses on the map...

    http://87.194.113.215:22222/#

    The only problem I can see is that the Landmark controls on the control panel are only accessible when there aren't any players on the server when the page loaded. If any are there (or appear) then, as Alex_of_War mentioned above, the controls push to the bottom of the screen and can't be used. But this not much of a problem.

    I have one request. Could anyone provide a guide on switching the landmark markers to the png of our choice? I was using the flag png that someone had provided some time ago here, but I can't get it to work now (whenever I try to change to the flag poles the landmarks simply don't show on the map anymore).

    Alternatively, could the png file used for the markers be configuragle in the config.yml?
     
    Alex_of_War likes this.
  4. Offline

    serenewaffles

    Still having issues with Apache. After a time, new landmarks just don't show up on the map. They are still properly added to markers.json, however.
     
  5. Offline

    Neils

    Is it possible to show the Text near the markers as default (using the settings) ?
     
  6. Offline

    serenewaffles

    Using Landmarks 0.3, dynmap 0.20.1, Apache.
    New landmarks don't appear on the map until the server is restarted.
    EDIT: It isn't a restart, it just takes longer to update the map with the new information in markers.json.
     
  7. Offline

    darkcloud784

    Will this be updated to the new dynmap build?
     
  8. Offline

    FrozenCow

    Landmarks 0.3 should just work with 0.20.1. Extract all files in your plugins directory and add the landmarks component to your configuration, that should be all that is needed.
    BUT:
    If you have the web-files placed somewhere else, make sure the web files are also updated there.
    If you are not using Dynmaps internal webserver, make sure the webserver doesn't have the files cached, or else it could still send the old version to the browsers.
    Also, just to be sure, clear the cache of your browser.
     
  9. Offline

    Alex_of_War

    Would it be possible in a future update to support multiple icons for different landmark types?
     
  10. Offline

    jycs

    I forgot to thank you
     
  11. Offline

    StopBreathing

    I keep getting the error loading maptype error?
     
  12. Offline

    oglop

    can you add some screen shots? (I'm english isn't so good and I din't much understand to description)

    Thank you
     
  13. Offline

    tomomsius

    Can someone fork this ? because hes not updating it and adding new functions
     
  14. Offline

    atlem

    yes this do the job
    btw how do i make custom markers ? do it only support one type. i want difren .png`s
     
  15. Offline

    chuiby

    Does it support CraftBukkitUpToDate?
     
  16. Offline

    tha d0ctor

    is this still working with he latest RB, mine doesn't seem to be working
     
  17. Offline

    Nikademus

    Using a new Dynmap 0.20.1 install with Landmarks 0.3 on an apache server, players are not appearing on the map. It also fails to load clock/sun/moon, but only when a player is online. Chat, landmarks, and everything else seems to be ok.

    Code:
    components:
      - class: org.dynmap.ClientConfigurationComponent
      - class: org.dynmap.ClientComponent
        type: settings
      - class: org.dynmap.ClientComponent
        type: landmarks
    
     
  18. @Afotai
    @Alex_of_War
    To keep Landmarks options visible, open dynmap\web\js\map.js (in Notepad++ for ex.), find this line:
    Code:
    playerlist.height(sidebar.innerHeight() - (playerlist.offset().top - worldlist.offset().top) - 64);
    and replace it with this line:
    Code:
    playerlist.height(sidebar.innerHeight() - (playerlist.offset().top - worldlist.offset().top) - 185);
    @Ayaron
    To change landmark icon, go to dynmap\web\images\ and replace landmark.png with whatever you like, then open dynmap\web\css\landmarks.css (in Notepad++ for ex.), find this:

    Code:
    .dynmap .landmarkMarker {
        background-image: url(../images/landmark.png);
        width: 14px;
        height: 14px;
        padding: 0px;
        margin-top: -7px;
        margin-left: -7px;
        position: absolute;
        z-index: 100;
    }
    And edit it as like as you wish (width, height must be real dimensions of your image).
     
    Trollkemada and Alex_of_War like this.
  19. Offline

    TwoHeadedBoy

    This has been driving me nuts, and I'm wondering if it's happening to anyone else. Since the earliest versions of both Landmarks and Dynmap, I've had a recurring problem where the Landmarks settings pane fails to load entirely, and I have to reload the browser multiple times for it to appear. I'm using bukkit ver. 1000, the Dynmap 0.20.1, and Landmarks 0.3, along with Chrome 13. Any advice?
     
  20. Offline

    Alex_of_War

    Works beautifully now - thank you!
     
  21. Offline

    WolwX

    @FrozenCow Thanks again for your work :)

    Using your 0.3 revision, but I have a two request :
    - using custom icon don't work anymore ? If someone can show me the trick to use into the css file or in another file please
    - can you implement a new permission or system permitting someone to add x numbers of active landmark ? That's can be verycool to allow normal player to only have 1 or 2 landmark it can modify later. :)

    EDIT :
    I readded the "type" of icons working with your 0.3
    Just by readding the type class into the js file =>

    line 78 find :
    .addClass('landmarkMarker')
    add after :
    .addClass('icon'+data.type)
     
  22. Offline

    Trollkemada

    Usefull for me too, thanks !
     
  23. Offline

    MathijsNL

    For some reason my markers dont show up. Is this caused by the dynmap update, or should it still work?

    Please ignore, found the post with the update :)
     
  24. I noticed 0.2 is not working with the latest dynmap - which of course is a known issue - but I didn't see the new files posted by FrozenCow until after I already fixed 0.2 myself. I also added in a landmark list simply because I wanted one and disabled the settings panel because it was buggy on my setup and I had no need for it...

    I included my own edit of landmarks 0.2 in this post.

    It is basically a (pretty efficient) rewrite of landmarks.js in the web/js folder as well as some minor changes to landmarks.css in the web/css folder. Simply extract in your web folder overwriting existing 0.2 files and it should "just work" with the latest dynmap. The landmark list has no problems with many players online and can scroll if you have many landmarks. Clicking a landmark in the list will pan the map to the clicked landmark. The list also supports multi-world just fine, though it may take a few seconds to update itself after switching between worlds.

    If anyone (including the original plugin author) wants to "steal" my edits feel free to do so - I consider them public domain and you can do whatever you want with them.
     
    alfskan and Krzychu like this.
  25. Offline

    gogorot

    FrozenCow (or anyone else able to do it :)):
    can you merge in your updated version the changes made by zaph34r for 0.2 that added custom icons support?
    thanks!
     
    DetCox likes this.
  26. Update to my version:
    - Now has support for zaphe4r's custom icons. (There you go, gogorot)
    - Landmark list is now alphabetically sorted, now also displays icons.
    To use custom icons:
    Put a PNG file of size 14x14 in web/images/, using the filename landmark_TYPEHERE.png
    I included a landmark_default.png (new icon, default is the type used when no type is set!) and a landmark_house.png (the original landmark icon I renamed to this). Filenames need to be lowercase always, even if you used uppercase letters in your landmark types!
    No need to edit any CSS or config or anything, simply put the .png file in the correct folder and it will "just work" like that.

    Same goes as before, feel free to steal these edits and do whatever you want with them.
     
    seriosbrad and gogorot like this.
  27. Offline

    seriosbrad

    I like this! Keep it up
     
  28. Offline

    kaynide

    Great update!! Thanks a lot! Sorry, a few questions/requests for help:

    1) I'm trying to figure out if there is a way to organize the landmarks by type, or perhaps to layer them (think folder system where folder=type)

    2) Is it possible to remove the graphics on the top right list of landmarks (my icons are sized differently and don't work as default)

    3) Dreamworld now, but is it possible to do the above and have them collapsible and/or toggled? See attached picture. Of course it's all example done in photoshop, but basically you can see some show their contents, some don't (House does not). Some are also hidden and some are not (Green is shown on the map below, red not).
     

    Attached Files:

  29. Good to hear people are liking my edits. I recently forked zaphe4r's edits to the .jar and have been working on adding some more functionality to this in-game as well.... more details on that later :)

    Yeah, no problem. Easy. I'm a little busy with other things right now (my day job, heh) but expect another update that will include this soon (within a few days, probably).

    Yes. Open up landmarks.css and add a line as such to the bottom of the file:
    UL.landmarklist LI {background:none!important;}
    That will disable icons in the landmark list.

    Not as hard as you may think. I'll probably add this at the same time as the "layering" thing. Nice idea, I like it.
     
    neXorianus likes this.
  30. Offline

    kaynide

    Thanks for the update and how-to's.
    Great news on the possible future updates! Looking forward to it! Thanks for your time on this.
     
  31. Offline

    Massimo1993

    @Thulinma

    hi excuse me but you can add support for more big immages ex 20x20? or 25x25? and a feature to disable and enable landmarks view?
     

Share This Page