weight/distance return on non standard crs
hayden-t opened this issue · 2 comments
Hi, got your library working but im using leaflet in simple crs mode with the coords just being the pixels of my map (no projection, just hanging in space) (its for a game)
The weight/distance returned seems to be hard coded for spherical ?
How would i go about getting a usable value ?
for example my image / crs is 1024 wide and 888 high, if i path a line from top to bottom, the weight is 18680.77347923352 if i do a path from left to right , the weight is 3906.0551639612486
So by using your weight function in the readme it fixes it, you should add in the readme that using a custom weight formula also overrides the distance calculation returned.
Hi, changed the wording slightly. To be fair, from what I can tell the docs already says it's the total weight returned - the property's name is even weight
, not distance.