Git Product home page Git Product logo

tibia-map's Introduction

Online Tibia map viewer

This is an online Tibia map viewer (in slippy map style) that uses the data from the tibia-map-data project.

Local setup

  1. Clone this repository and cd to its root directory.
  2. Install and use the expected Node.js version: nvm use
  3. Run npm install to install the dependencies.
  4. After making changes, run gulp to build a new version of the src files into the dist directory.

Credits

This code is based on the old TibiaMaps map viewer which was written by @Cavitt aka Syntax. Without his hard work, this repository probably wouldn’t exist. Respect! 👍🏻

Maintainer

twitter/mathias
Mathias Bynens

tibia-map's People

Contributors

bernardoow avatar jaroslaw-janikowski avatar kik-tibia avatar lucasterra avatar mathiasbynens avatar nohus avatar tiagomartines11 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tibia-map's Issues

Hidden Button

When the floor reaches the limit, should we hide the button?

I created pr for this, maybe can be merged or closed !!

[REQUEST] Range from selected coordinate

In Tibia, while in idle state, most NPCs will walk around in a random pattern however in a limited area. This area is set with a parameter on server side files for each NPC that compares the NPC start coording with N, where N is the "radius" in all directions from the starting coordinate.

For example, Cipfried, located at Rookgaard's temple (32088, 32217, 7), has a range set to 1, meaning he can only walk in the top 9 tiles from the temple (1 tile from the starting coordinate plus 8 tiles surrounding the starting coordinate).

Sem título

I believe a feature that a user could toggle a radius view of the selected point could be interesting. Perhaps not that much for the general public but fansite like TibiaWiki could benefit from that and make information richer. With that said, it should be possible for whoever is embedding the map to be able to toggle this feature via URL, similar to how one can just edit the selected coordinates.

Thank you for reading.

Credits

Hey, nice projects. I'm the original creator of the map (Syntax). Most of this seems to be my code, could you possibly give credits in your readme? Thanks in advance :)

"Original code taken from https://tibia.xyz/ developed by @Cavitt" or something.

Tibia Beta Support

I don't know if this is the right place to post, but since today cipsoft made their beta client open to everyone, will there be a support for it in automap? it seems like the client has no way to export/import map between old and beta clients

Block Point

When I will do some quest I check in some fansite spoiler about quest and then see and drag the map. In some cases, I clicked wrong at map and changed to new coordenate.

My proposal is add new urlParam to block the point.

Proposal

I was using the Tibia Wiki and I saw the map
timage. I didn't like this blank button without function. I think a little modification will improve UX.

My proposal is create something to enable display of fullscreen button.

exiva overlay near/far is off by one

From what I can tell from my own experiments, the cutoff point from near to far is 100 tiles, not 101.
i.e.
5–99 squares: to the [direction]
100–250 squares: far to the [direction]

So if I'm right, the exiva overlay is off by one. Would be good if someone else could check this too, just in case I made a mistake.

Marker overlay: add ability to select marker pack

Currently the marker overlay shows the default marker pack. It would be nice to select other packs (but not necessarily all of them). The most important other pack right now would be the PoI pack — it would be super useful to visualize which PoI areas we’ve already marked without having to actually install the pack locally. cc @tiagomartines11

Feature request: tile friction data

Sometimes I want to know the friction of the floor in a particular area of the map. To do this, I have to open my local minimap folder, find the correct waypoint image and inspect it manually.

It would be useful if there was a button on the website to toggle between regular map mode and friction mode. If you are in friction mode, instead of displaying the Minimap_Color tiles, it would display the Minimap_WaypointCost tiles instead, and a label would tell you the friction of the selected coordinate.

Is this something you would consider adding?
Thanks!

Fix for browser history being "spammed"

This bug was only happening in Chrome as far as i noticed but this fixes it for all browsers it seems

    var setUrlPosition = function(coords, forceHash) {
        var url = '#' + coords.x + ',' + coords.y + ',' + coords.floor + ':' + coords.zoom;
        if (
            forceHash ||
            (location.hash && location.hash != url)
        ) {
            window.history.pushState(null, null, url);
        }
    };

Change that to

    var setUrlPosition = function(coords, forceHash) {
        var url = '#' + coords.x + ',' + coords.y + ',' + coords.floor + ':' + coords.zoom;
        if (
            forceHash ||
            (location.hash && location.hash != url)
        ) {
            window.history.replaceState(null, null, url);
        }
    };

and it all works (tested in Chrome and Microsoft Edge, IE11)

Include leaflet as dependency

Is it possible to include Leaflet as dependency? This way it's easier to manage the versions..
We could use bower or npm. It's only for one dependency so maybe it's not worth the setup trouble?

Url Changes

The url change when I clicked in map. But when I navigation between floor or change zoom, the url stay the same. It's a bug?

Totals not matching

New post shows that there are now 3,923,097 walkable tiles in total. (The previous official number was 3,868,388 walkable tiles... This total consists of 3,916,726

But the bottom of the website says 3,878,036 of 3,862,087 tiles explored (100.41%)

Some numbers do not seem to match up

Fix for pseudoFullscreen: False

For ppl who cant run 'pseudoFullscreen': true in map.js (i couldn't on my local website when i was testing.
and when i ran it as false it would cause a bug that when i enter and exit full screen 90% of the times it would bug out and the crosshair would dissapair and its off center when its generating so its looking really weird like generating offscreen and only showing half the map

This is my fix that ive tested and it works all time no issues!

the edit is in leaflet.fullscreen.css

/* Do not combine these two rules; IE will break. */
.leaflet-container:-webkit-full-screen {
  width:100%!important;
  height:100%!important;
  z-index: 99999;
  }
.leaflet-container.leaflet-fullscreen-on {
  width:100%!important;
  height:100%!important;
  z-index: 99999;
  }

with

 /* one selector per rule as explained here : http://www.sitepoint.com/html5-full-screen-api/ */
    .leaflet-container:-webkit-full-screen { width: 100% !important; height: 100% !important; z-index: 99999; }
    .leaflet-container:-ms-fullscreen { width: 100% !important; height: 100% !important; z-index: 99999; }
    .leaflet-container:full-screen { width: 100% !important; height: 100% !important; z-index: 99999; }
    .leaflet-container:fullscreen { width: 100% !important; height: 100% !important; z-index: 99999; }

Edit: made use of .leaflet-container instead of #map

Feature Request: Show map markers with labels

I was navigating the map today and found myself wondering what was island that was. The Map could have an option to show markers (the client markers would be enough), and then when hovering a popup with the name of the place would be displayed, possibly with a link to TibiaWiki.

Since it would be very time consuming to add marks at first, ideally they should be stored in a text format (e.g. json) so we can even edit and add new marks right here on GitHub, and then make the pull requests. I was thinking of something like:

{
 "X": 32078,
 "Y": 32441,
 "Z": 7,
 "Type": "Town",  // The marker type would be defined by this. 
 "Label": "Meluna",
 "Link": true
} 

This boolean true/false mode would only work if the label is identical to the Wiki page, but I think it's much simpler than parsing some sort of markdown inside the label, for example (but that would be ideal).

With this we could identify even small rooms, for example the exact room of each Inquisition boss. Since this could also pollute the map, perhaps there could a way to filter the markers you want to see (Towns, Boss, Hunting Area, etc).

I don't think I can do this by myself from scratch but I can try to help improving and of course adding the markers.

Proposal Markers

My proposal is to create the markers feacture.

Currently the map url consists of URL#part [coordinates]:part [zoom].

Ex: https://tibiamaps.io/map#32371,32200,7:0

With this functionality it would be URL#part [coordinates]: part [zoom]: part [bookmarks].
Ex: https://tibiamaps.io/map#32371,32200,7:0:32371,32200,7,2
Ex: https://tibiamaps.io/map#32371,32200,7:0:32371,32200,7,2|32361,32220,5,5

The markers would be the following data structure pos.x, pos.y, floor, marker.
Makers can be customized with images of monsters (I will check this possibility).

If there are more than one marker, they would be separated by a special character like pipe (|).

Can I implement?

Add support for cyclopedia map

This exists: https://github.com/elkolorado/tibialibraries/blob/master/cyclopediamap/map_merged.png

I tried using https://github.com/tibiamaps/tibia-maps-script with this https://github.com/tibiamaps/tibia-map-data/blob/main/scripts/build.sh however it raises couple hundred million assertion fails due to unrecognized colors in the cyclopedia image, resulting in no or minimal output.

Would be beautiful to be able to toggle between them, and something i was trying to develop on for a forked project but the rabbit hole went too deep for my non-existent nodejs skills.

Proposal: Make floor numbers easier to understand on level buttons

instead of showing like 0-15

you could do so 0 is ground floor +1 is one floor up and -1 is 1 floor down and so on no idea if you like it or not and it wont affect cords or anything its just for easier knowing what floor your on when browsing the map
goes from -8 to +7
example

code below is what i did to make it work you could try it out and see if you like
leaflet.levelbuttons.js around line 60~

	_setFloor: function(floor) {
		var floor_button = L.DomUtil.get('floor_button');
		if (floor == 7) {
			floor_button.textContent = String(floor-7).padStart(2, '0');
		} else if (floor > 7) {
			floor_button.textContent = String(floor-7).padStart(2, '-');
		} else if (floor < 7) {
			floor_button.textContent = String(Math.abs(floor-7)).padStart(2, '+');
		} else {
		floor_button.textContent = String(floor).padStart(2, '0');
		}
	},

Feature request: Add ability to browse historical maps.

Hello :)

It would be nice if tibiamaps had additional date picker widget which would allow to view map like it was at selected date.

There was some locations in Tibia that aren't present anymore like "Flute Room" under Fibula or island Travora.

I think that every tibian archaeologist would love this feature

Tiling issue in google chrome

Not sure how to discribe it it randomly appaears when moving around quick/updating location with cordinates #12314,13123:4 that kind of stuff if youy get what i mean and it fixes it self when zooming in and looks weird again when zooming out

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.