Using d3.js to display a gps route on OpenStreetMap? - gps

I'm thinking of using d3.js to display a gps route using OpenStreetMap as map.
I would like to be able to click anywhere along the route and get the corresponding location and timestamp. The gps locations can be anywhere around the world.
I'm new to the geo thing and not sure how to start or if this is a good approach.
/Lars

Related

How to get Windows.Point from Lat/Long

I am using the Bing Map Control for wpf on Windows 10. Given a Lat/Long location I need to get the Windows.Point value for that location. It should be relative to the map itself, namely, the upperleft corner (0,0). I use the Map.ViewportPointToLocation to go from a mouse location to the corresponding Lat/Long. Now I need the inverse function; I have not been able to find anything via web searches.
Try the maps TryLocationToViewportPoint or LocationToViewportPoint methods.
https://learn.microsoft.com/en-us/previous-versions/bing/wpf-control/hh709346(v=msdn.10)
https://learn.microsoft.com/en-us/previous-versions/bing/wpf-control/hh709336(v=msdn.10)

Possible to set geofence around specific points saved in database by an application?

I am working on an application which I can use to create custom geo-fence.
For that, I want to get the coordinate of the location (latitude, longitude) and save that in the backend database using the app.
Now for each point saved, I want to create a geo-fence around each of those points, say with 10-KM radius.
The entry and exit action for all of them will be same.
How to accomplish this ? Can be be done ?

How to load geo-localised informations based on map configuration and interaction

I'm currently creating a new website based on geo-localised information to display on a map. I've never done this kind of development before, and my researches don't lead me to a decent result.
What I want to do is load a few POI on the map, say 15 by 15 until all POI are loaded on the map (This is to show the user that data is loading progressively).
I know how to load said POI 15 by 15 based on their update date in a scrollable list (Using limit and offset, but this implies that we have the same reference as a starting point), and now I want the same kind of behaviour, but based on their location instead of the timestamp.
What I'd like to do is trigger the update based on the center of the map when it moves, so that it starts loading POI in the displayed area, but without reloading what was already loaded.
I can't figure out how to do that.
Say the user moves the map to the side, but keeps some POI on the map, it should reload from the center to the edge of the map without re-adding the POI.
Also, when the user zooms out, it should load around the already present POI, as the center was already loaded on previous zoom.
The only think I was able to find and understand is how to sort POI based on a distance, with the Haversine formula from here:
http://www.plumislandmedia.net/mysql/haversine-mysql-nearest-loc/
But it doesn't cover the part where you interact with the map and need to load new data to add it to what's already there.
I'm using Leaflet to show information on the map and listen to events.
Any guidance welcome.

MapKit how to get the Bezier path of a State

When i look at apple's Map, I can see the different bezier path of a specific place. I would like to know how to extact that information directly from the map. So let's say the user selects New York, I would like to highlight NEW York's Bezier path directly on the map. can this be done?
You will need an alternative form of data that ideally is very close to or exactly the same as the border being drawn by MapKit. You aren't going to get this from Apple.
Take a look at this blog post, where I accomplish the same thing with an open source framework (Mapbox GL) on the web:
http://justinmiller.io/posts/2015/01/20/anatomy-of-a-travel-map/
The ability to highlight areas like this should work in the iOS version of the toolkit as well (https://github.com/mapbox/mapbox-gl-cocoa) though you will not be able to do the interactivity directly in that framework.

MKMapKit and google tile location

i am trying to add some MKOverlays to a MKMapKit. I'll be using our WMS server to fetch tiles based on google's grid location standard and adding them. To make the call, i need to tell our WMS server the google tile (x, y, and zoom level).
i've looked over apple's TileMap sample code which looks like it uses google's tile system.
Does MKMapKit return this information or do i need to derive it from GPS coords?
You have to derive it yourself. I found this sample very useful:
https://github.com/mtigas/iOS-MapLayerDemo