Leaflet.js with a non-real world map! Coordinates

I am working on creating a Day Z map (game) with the JS booklet and want to be able to display objects on the map using the coordinate system of the game, see http://dayz.ollieb.net

In the game, the upper left coordinate is 000 000, then 001, 001, where units of 10 represent the grid, so 010, 010 will be the upper left β€œgrid” (similar to the mystery survey).

How to create a method for transforming the provided coordinate systems (either by points or by latong) to work along this path. Basically, they just need to go from 000, 000 (top left) to 145, 130 (bottom right). I am currently having a problem using lat / long as it is a curve to compensate for the projection and it seems that the points (x / y) are changing on one computer!

How can I take the point of the game and create a marker on the map while indicating? Presumably I need to tell Leaflet.js that the β€œnumber” is at the top left and bottom right of the map?

Sorry for the lack of understanding, I have read all the documents and do not see anything like it!

See an example here: http://dabrothas.net/sei/daisy/index.asp?mode=mark&z=3&x=-109.2294921875&y=73.49222029152183

+2
source share
3 answers

I am the author of lithography.

Check out the examples below for sample code for creating a non-global CRS: https://github.com/Leaflet/Leaflet/issues/210 https://github.com/Leaflet/Leaflet/pull/676

I plan on refactoring projection logic for release 0.4 to make such things a lot easier and more natural, so stay tuned!

+7
source

The grid coordinate system could be close to a sector on a sphere with almost square properties if it would occur only under the equator at zero degrees of longitude. For all purposes, within a radius of 15 miles, the longitudinal lines will be almost parallel.

From here, you could scale the grid coordinates to a few $ t $ seconds in width and height, and then set up a normalization method that can copy the Leaflet LatLng coordinates that it seems to need. Since you are in the same hemisphere, with 0 degrees latitude / longitude in the northwest, your latitude will always be negative. Hope this makes you think ...

+2
source

The 0.8-dev flyer is advanced enough to allow fully customizable coordinate systems, here is an example that works great on the counter scale with linear CRC, even with scale widgets:

https://gist.github.com/MarZab/7e3b1522ebc383f448a0

+2
source

All Articles