- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How can I change the starting point?
Current
How can I express it like this?
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
As Luke said the issue is related to the underlying javascript leaflet this visualisation uses.
https://github.com/lit-forest/leaflet.migrationLayer/blob/master/README.md
Similar issue with solution - https://github.com/Leaflet/Leaflet/issues/82
Tweaking your negative longitudes should resolve it for you like this example below.
| makeresults
| eval start_lat=47.67, start_lon=-122.34, end_lat=37, end_lon=126
| eval start_lon = if (start_lon < 0, 360+start_lon,start_lon)
| append
[| makeresults
| eval start_lat=60.69, start_lon=140.68, end_lat=37, end_lon=126
| eval start_lon = if (start_lon < 0, 360+start_lon,start_lon)]
Edit: It looks like this fix breaks other arrows. You could do a much more complex fix by working out the 360 degree adjusted coordinates and the normal coordinates. Detemine the distance between both and the intended destination and pick the shortest one.
Example on how to calculate distances can be found here - https://answers.splunk.com/answers/752171/distance-between-two-geocoordinates.html#answer-752516
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
As Luke said the issue is related to the underlying javascript leaflet this visualisation uses.
https://github.com/lit-forest/leaflet.migrationLayer/blob/master/README.md
Similar issue with solution - https://github.com/Leaflet/Leaflet/issues/82
Tweaking your negative longitudes should resolve it for you like this example below.
| makeresults
| eval start_lat=47.67, start_lon=-122.34, end_lat=37, end_lon=126
| eval start_lon = if (start_lon < 0, 360+start_lon,start_lon)
| append
[| makeresults
| eval start_lat=60.69, start_lon=140.68, end_lat=37, end_lon=126
| eval start_lon = if (start_lon < 0, 360+start_lon,start_lon)]
Edit: It looks like this fix breaks other arrows. You could do a much more complex fix by working out the 360 degree adjusted coordinates and the normal coordinates. Detemine the distance between both and the intended destination and pick the shortest one.
Example on how to calculate distances can be found here - https://answers.splunk.com/answers/752171/distance-between-two-geocoordinates.html#answer-752516
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I think that this is due to the way that Leaflet.js (an underlying library for this viz) handles lines that cross the date line. It will generally go the long way around rather than cross the date line.
There's a workaround presented here: https://github.com/Leaflet/Leaflet/issues/82
I'll have to spend some time trying to figure out how that workaround could be applied in the context of this Splunk viz. I'll try have a go at this on the weekend and report back.
