In our case, we have a google map displaying our product. There is a search field. If the end user puts in a address, it geolocates that on the map without issues. If the end user puts in a GPS location (not address) it does return a result but it is off of the proper location. The issue is sometimes users put in a GPS location, and sometimes an address. The address is fine cause we don't know their exact GPS, but if they put in the exact GPS, it should find them on that GPS location, right now it returns about a 1/2 mile away from where the actual location is per the map.
Related
Using HERE Maps Api, for a geographic coordinate (lat, lng), I would like to find address information for the nearest routable road. Information that includes:
Address (street, house number, city, postal code, country)
Bearing/Heading of the road (0 to 360 degrees from True North)
How can I achieve this through HERE Maps API?
So far, this is what I have been able to achieve:
Calling the calculate Route API with identical start and end endpoints and mode=car will force the API to snap to the nearest routable point. This step is necessary for when the input coordinates are for a pedestrian street.
Using the nearest routable point coordinates, I can call reverse GeoCode API and I will be able to find the address information I need.
The next step is where I'm currently stuck. I'm able to find information like direction=NW, however I can't find the ~exact bearing in grad, for example bearing=265.
Is this achievable? Are 3 steps really necessary or is there a HERE Maps API endpoint that can provide all of this?
You can use the Fleet Telematics API to get the headings value for a particular road. Read more about the api here - https://developer.here.com/documentation/platform-data/topics/quick-start-view-map-data.html
You can also look at the field explanationshere - https://tcs.ext.here.com/pde/layer?region=WEU&release=19111&url_root=pde.api.here.com&layer=ADAS_ATTRIB_FC1
HEADINGS Horizontal road heading [10^-3 degree] at coordinate points along the link, when driving from Reference Node. Comma separated. Each value is relative to the previous. No values here for the ref/nonref nodes, because they are in the separate fields REFNODE_LINKCURVHEADS and NREFNODE_LINKCURVHEADS.
I'm developing an asp.net web app and i need to detect the current Geo location and save it to a variable and than show to user its current place name and through this I will guide the user to where he want to go, and than user will in put the destination and I will guide that what the root will be suitable for him and I will provide full detail.
I'm getting its current location but don't how to show to user by displaying on label or in textbox.
I don't know where to start this.
If you are able to access the current geolocation of the user then you need to do the following things-
Get Destination
Now you need to get the destination name from the user using some mode of text input or, speech to text etc.
Geo Code destination
Now you need a good geocoding API to get the coordinate of the destination that user has entered. You can use google's geocoding API. It is available for both client(JavaScript) and server(C#, Java, PHP -etc) side. All you need is an API key.
Find Route
Now you have to find the route between the two coordinates (your current location and destination coordinates). Google provides a direction API for the same. Again you can implement this both on the client or, server side (I will prefer client side to reduce the load on the server end). This API returns a long polyline string which can be decoded into a list of coordinates to plot the route on the map. It also returns a list of maneuver data containing the direction info and road names etc. This maneuver info will help you to direct your user to the destination at the time of navigation.
Plotting the route
Now is the time to add a map canvas to your application and then plot the route to it. You can now use the list of coordinates that you decoded from the polyline to draw a polygon on the map. See this below screenshot from one of my application where I drew the path on the map and also marked all the maneuver points on the path.
Navigation
Well, now you are almost done. Now you can start navigating to the destination. Now use whatever mechanism you use to get the user location periodically and then update it as a marker (you can use a car's icon) on the map and then whenever you reach (calculate the distance) a maneuver point show user the maneuver message like "Turn right"/"Turn left"/"Continue straight for 100 meter" -etc.
If you are stuck with getting the current user's location then you can use HTML5 to get devices location using the network.
Hope this is helpful for you.
I realize that the question is pretty complicated and may require much research. Hope anybody can help me to get useful resources to achieve my goal.
I want to have a Google or Bing map on my ASP.NET 4 application (C#) to display all my logged in users as points on the map.
I understand that this involves five major problems
Get the location of the device (most likely standard laptop with IE9 browser) based on its unique IP address.
Integrate Google or Bing map with ASP.NET or Silverlight application.
Display the right portion of the map with the right Zooming depending on logged-in users locations.
Finally, mark the addresses as points on the map.
Note that the locations points should be dynamically reflected when any of the locations is changed.
The database is implemented using SQL SERVER 2005/2008R2
There are geo location services that can give you the latitude and longitude given an ip address.
As you mention you would be storing these in a database, getting all the current users would be simple database call.
Integrating a google map into a html page is very simple. You would only have to emit the necessary javascript from your page.
You should mark the points on the map first.
Google maps api has calls to fit the map to show all current points(fitBounds). I am guessing bing would have something similar.
To reflect the current points, you would have to fresh your locations from the database. I highly recommend an ajax call that returns json and using that to replot the points.
I've searched google every way from Sunday that I could think of but I cannot seem to find an answer to my question.
Right now I have a map that is using a FusionTableLayer to display the location of geocoded addresses. Does anyone know if it's possible to get the LatLng coordinates of the geocoded address without having to do a secondary geocoder call to geocode the address? Or maybe get an array of all of the markers currently displayed?
like myFusionTableLayer.getMarkers() or myFusionTableLayer.getMarkerLocation(index) or something would be helpful.
It is not possible to retrieve the locations from geocoded addresses in FusionTables. It used to be possible, but that capability was removed, I believe for legal reasons.
If you geocode the addresses outside of FusionTables and store the coordinates in the table, they will be available.
I am struggling with the following problem and can not find any solution in the Goolge Maps API docs or in the net, therefore I will try to post my question here:
I was using Googles Static StreetView Image API, where you can pass as a location a long/lat or a string with a postal address. In my case I was always using the string approach that contains in most cases the address with a housenumber. I was astonished by the results of the returned image, which was in most cases perfectly oriented in the direction to the searched address.
Now I wanted to give the JavaScript API for StreetViews a try. It works perfectly fine with the only available interface for a location through specifing the address through long/lat values. Through the optional pov parameters the heading can be specified too. But in case you want to initialize the StreetView with a postal address with a housenumber you are lost with that API. The only way is to geocode the postal address to a long/lat value through the Geocoding API but with the handicap of loosing the heading information. As a final result the initial StreetView image was completely different oriented in such a case.
I checked again the Static StreetView Image API and found following comment to the heading member:
heading (optional): ... If no heading is specified, a value will be calculated that directs the camera towards the specified location, from the point at which the closest photograph was taken.
Is there anything I can do here? How can I find the perfect heading between the position of the made photo to the location I am looking for? It seems only Google can do this through some internal magic for the Static StreetView Image API.
1) Indeed geocode the postal address to a long/lat value, so you have the 'exact' location of the house.
2) Use streetViewService.getPanoramaByLocation to see if streetview is available, and the response will include the exact location where the streetview image was taken.
Now you can calculate the heading between both points (1 being 'the house', and 2 being 'the camera'). You can use the google.maps.geometry.spherical.computeHeading function for this - see https://developers.google.com/maps/documentation/javascript/geometry#Navigation