Please do note that by contributing, you are providing me (Vincent Neo) the rights to include and distribute those changes on the binary app published on the App Store (which is released under Apple's Standard License Agreement). If you require a feature that has yet to be available, do open an issue, describing why and what the feature could bring and how it would help you!
Feel free to add a pull request or open an issue. Wikimedia Foundation (with Retina Support)Ĭontributions to this project will be more than welcomed.Auto restore of previous settings when reopened (like chosen map source, etc).Minimap for easier locating in complicated tracks (can be disabled).Display of total distance of the tracks.Shows GPX file contents on Apple Maps (Waypoint and Track point support).This application was developed by the contributor of the project (me), initally as a personal use app,Įventually it is developed to being more complete, and that it can be expected to be improved on as time goes by. You can still build your own copy using Xcode, if you wish.Īvenue is based on some codes over at iOS-Open-GPX-Tracker.
We don’t strictly need to use this function to get the coordinates, because getRelationToCanvasPoint returns these as well, but this is sort of a double check.A simple GPS exchange format viewer for macOS.Īvenue is a GPX file viewer that aims to allow quick and easy access to the data in a GPX file.įor easier management, future updates will be distributed on the Mac App Store. When we know the total distance to the point on the track we can get the coordinates of this point by the getPathPoint method. We multiply this value by line segment length (obtained by getPathLengthToElement method) and add that value to the total path length to the segment (also obtained by getPathLengthToElement). This information contains the distance property which has values from 0 (line segment start) to 1 (line segment end). To get a precise location and distance of the cursor on the track we use the getRelationToCanvasPoint method, which returns information where the cursor is located on the line segment. Note that the style layer of the feature needs to have the property ‘advanced-hit’ = true for this to work. The function onFeatureHover is called with an event parameter that contains - among others - a property named ‘element’ which is the index of the line segment we are hovering over. What is next? We have to figure out over which part of the track is the cursor hovering. Now we have the callback function onFeatureHover which is called when the cursor hovers over the track.
When the cursor leaves the map we pass ‘false’ to stop generating hover events. We need to generate hover events even when the cursor is not moving, which is what the parameter does when its value is ‘true’. You are probably wondering about the third parameter in the ‘hover’ method. on ( 'mousemove', onMouseMove ) mapElement.