iitc-project / ingress-intel-total-conversion

ingress.com/intel total conversion user script with some new features. Should allow easier extension of the intel map.
http://iitc.jonatkins.com/
ISC License
989 stars 552 forks source link

Links on map are not drawn with the correct projection/method #201

Closed jonatkins closed 11 years ago

jonatkins commented 11 years ago

A relatively long east-west blue link was placed between two portals

This link passes very close to another portal

The stock intel map shows this link passing to the north of this portal: image

IITC however, has it passing south: image

I'm guessing either map projection related, or more likely, straight line type. Looks like Ingress uses great-circles, but our lines are constant-bearing?

The ingress app gets it wrong too: image (I'm reporting this separately to Niantic as an ingress app bug)

Fragger commented 11 years ago

Going to probably be a tougher fix as it doesn't look like Leaflet supports or is going to support geodesic mode https://github.com/Leaflet/Leaflet/issues/384

Also fields should take this into account as they will have the same problem.

Fragger commented 11 years ago

I'm looking at this: https://github.com/springmeyer/arc.js probably turn it into a leaflet plugin for simplicity

jonatkins commented 11 years ago

It's rare it causes any noticeable problems, but would be nice to fix. But best to wait for confirmation of my bug report in case they decide to change the definition of "straight line" :)

Fragger commented 11 years ago

Also fields on the stock map apparently don't use geodesic mode but I think it's probably an oversight. It makes sense to me that you would want that kind of projection, with the shortest path between the portals being used. I may make up the Leaflet plugin just for anyone to use and it will be ready when we want it.

Fragger commented 11 years ago

Well just an update: Leaflet.Geodesic coming along okay, having a bit of fun making a plugin up for leaflet that should be pretty useful for anyone needed that mode. At the moment it should be good enough for our needs if we get confirmation that geodesic mode is intended for links and fields.

rongou commented 11 years ago

I can confirm the game engine is using geodesic for links and fields. The stock intel map used to show links as straight lines, but they fixed it after Bay Area agents built some large fields that exposed the issue.

hastarin commented 11 years ago

@Fragger I guess this means we'll need to update to using your plugin when you finish it. :)

Fragger commented 11 years ago

Sounds good, I need to get around to finishing that up. Also looks like we need geodesic circles as well for the portal range indicators to be accurate.

Hobadee commented 11 years ago

I don't know how far you are on this, but I found this the other day when planning (and executing) a mega-field. http://geographiclib.sourceforge.net/scripts/geod-google.html

There is source here: http://geographiclib.sourceforge.net/

Geodesic lines in IITC would be a GREAT help in planning major operations.

ij0n commented 11 years ago

link-wolgast-helsinki-16-06-2013-2148l-success-annotations This illustrates the problem.

MonoTovarisj commented 11 years ago

Especially with the new ranges of portals, this becomes a much greater problem now a lvl 8 portal with range amp can reach 1883 km