Is there a way to catch which method is currently being used by the device when geolocation (watchPosition) is called? i.e. if the position comes from GPS data or some sort of trangulating or ip.. Can't seem to find anything in the position object in the callback..
as far as I know, you can't get the source. The information provided came in my experimentation nowhere close to my location (it thought I was 100km away).
What you do get, is information how accurate the lat/long is. Combine that with altitudeAccuracy outlined in the specification and you can assume which service (GPS, WLAN, etc.) gave you that information.
Further, you would then use something like the Open Geo DB to nail-down in which city the user is.
Related
I have very important question for me. I would like to use Autodesk Reality Capture API in my app. I read the documentation to API but I did not find it. I know the position of camera and i would like to send this information to Reality Capture API. For example circle was divided in 24 parts. So I know that each photo was made every 15 degrees. Is there any parameter which gives me possibility to provide the position of camera?
There is no way of passing this kind of information to Reality Capture API (at least no official way) and even if it is debatable, there is not much use for such input.
Roughly speaking, the engine will “stitch” the given images based on common pixels/regions/patches. For complex objects, each 15 degrees might not be enough to capture the complex geometry and you will have to add more photos aiming that specific region.
The main benefit is that you can process your images, get the result, see the missing or low detail spots, take a bunch of photos of those specific spots and add them to the project, process your project again and repeat till you get a satisfying result. From this perspective, the "rule" of photos taken each 15 degrees will break very fast.
If you are getting wrong results, 80% of the time (again the Pareto principle) this is caused by missing the scenetype parameter, which defaults to aerial, when usually people expects to use the object type.
Check The Hitchhiker's Guide to ... Reality Capture API for more details.
I am wondering if it's possible in any way to get a list of businesses that have done a Google Virtual Tour (basically a Street View, for businesses) by querying in Google Maps API.
I was hoping that perhaps the Places Library might contain this information in a response, but no dice. This is kind of visible in an everyday map (see Hotel Boulderado) but I don't think the information is included in any kind of query I can do.
I also saw a few questions dealing with finding a Street View by a specific LatLng - I'm looking for a more general, area-based search.
Any ideas or things I missed?
I was hoping that perhaps the Places Library might contain this information in a response
Places API can provide you a "list of businesses" in an area by trying to filter it up with specific Place Types. You are, however, limited to the constants the API provides. If you're using PlacesService, you can use nearbysearch which I think is more appropriate to your case.
I also saw a few questions dealing with finding a Street View by a specific LatLng - I'm looking for a more general, area-based search.
I'm not sure what you mean by "area-based search", but Street View on a specific LatLng can be tricky since its only available on some areas. The Explore StreetView site highlights what countries currently have data (zooming in suggests that it doesn't necessarily captured the whole country; mostly are road routes, etc.)
A StackOverflow entry indicates a way to handle if StreetView is available or not.
Hopefully the answer raised some clarifications in your end.
I'd like to create a route from point A to B.
I'd like to show the current position of the traveler on that route line.
If the traveler deviates from the route I'd like to update the route to compensate realtime.
Basically what Google maps does but I'd like this in my own application.
I looked at Google and Bing Maps API and nothing seems very intuitive.
Whats the best way of doing this?
Logic:
Depending on what you're trying to achieve and most importantly, how you plan to implement those features, you might consider doing it in two steps.
1/ Generate a basic route and create a buffer around
To generate it, use the platform of your choice and retrieve the geometry that you will be able to use to generate
2 / Detect if it get out of the original buffer and generate a new route and go back to step 1
Once you get the buffer, your regularly (based on your location events for example) check the intersection with the buffered route, if it's out of the buffer, then you recreate the route and so on.
Implementation:
In order to do this, you might be interested in using Turf library, see this example:
http://turfjs.org/examples/turf-buffer/
Combined to Within() method:
http://turfjs.org/examples/turf-within/
Turf is available here:
http://turfjs.org/
Consideration
Be careful though regarding the terms of use of each platforms as you might not do driving/navigation application depending on the cases and platforms you want to implement.
You might be able to implement it quite easily, there might be something you can add to optimize accuracy (like bearing to the next geometry location, speed profile...), but I'm sure it will cover at least 90% of your needs based on the described case.
My client wants some of the functionality of Google maps namely:
- geocoding
- generating maps with points based on postal code or long.lat
- optimal trip mapping
Their issues with Google maps
- cannot control outages
- postal codes are sometimes inaccurate or not updated frequently for Canada/UK
- they have no way to correct inaccurate information
They would prefer to host the mapping application themselves, but will require postal code updates.
Can anyone suggest such a product?
thanks
"cannot control outages - postal codes are sometimes inaccurate or not updated frequently for Canada/UK - they have no way to correct inaccurate information"
Outages
hosting your own mapping is the only way to control this, but you would be very very hard pushed to beat Google Maps / Bing Maps uptime over the last 5 years. Take a look at the following:
OpenStreetMap for the road imagery data, this is open source data very good in the UK (Im not sure about canada) and you can make your own changes and submit them (or just change the data you have downloaded)
Geoserver, Mapnik or MapServer will read openstreetmapdata and create the image tiles needed to create your own maps in whatever style you wish. Depending on if you dont want all countries and all zoom levels these products can create all the tiles you will need in advance, but usually they have to be created in real time and cached. You need a BIG fast server to manage tile crunching
Openlayers or Leaflet are open source javascript mapping platforms that will display your tiles for you
Obviously this is just for road maps, aerial imagery would cost you an absolute fortune.
Post Code Data
Many people do not realize that UK postcode data for latitude and longitude is now completely free and available to download every quarter from the official source (ordinance survey) http://www.ordnancesurvey.co.uk/oswebsite/products/code-point-open/index.html.
This is the same data source Google will use and there is none better but it will always contain inaccuracies and always be a few months out of date.
Finally
Hopefully that answer the question you asked and gives you information to inform your client. Now for the question you didn't ask "Is this approach good value to my client?".
I won't presume to know your business or client, however what I described above is possible but with one to many months of work involved to get it all working together and even then it wont have any where near the performance or uptime of something like google /bing maps and only offers a small subset of their features.
I think you're looking for something like Caliper-It's a very custom, and I would expect expensive, solution. Not suggested.
http://www.caliper.com/GISMappingSoftwareDevelopment.htm
One solution could be to use two different mapping services and compare their results, this way there's a much better chance the data is accurate. You can also fix inaccurate data by creating a system which acts as a barrier between the API and your user, where data you know is inaccurate is corrected before it's displayed. Not sure exactly what you're doing though, so this might not work for you.
Is trip mapping/routing the basic functionality you want to do?
Before rushing into rolling your own, I'd suggest a good think about the consequences of doing so. The first that springs to mind is whilst the pros are that you can now control your data, the cons are that you now control your data.
So you are going to have to consider where and when you get updates and the processes you are going to have to employ to keep your maps in sync with the rest of the world. There are a lot of headaches involved in these things which is why so many people use externally hosted solutions such as Googles.
Just a quick question I have built the following code:
http://letterpool.testmode.co.uk/map.html
However with some users I am getting reports that people are getting around a 200-300 meter of their actual location.
Does any one know why ?
The W3C Geolocation API, which you're using to locate users on the test map, is intentionally agnostic to the method the browser uses to locate the device. This is a useful convenience since devices vary widely on how they locate (GPS, WiFi triangulation, cell tower triangulation, IP geolocation, manual entry, etc.) and your website probably doesn't want to deal with all of those details.
However, if you're not happy with the accuracy, there are a few options you can take advantage of that may help. The enableHighAccuracy option will hint to the device that it should prefer to use up a little more power in order to get a more precise location. You're currently using the latitude and longitude of the return value, but the API also returns an accuracy value, so you can see whether the position you're receiving is precise or not. You could also use watchPosition which will continually update the location and may eventually get a precise enough fix for your purposes (most mobile devices tend to start with low accuracy and get more refined over a few seconds or minutes).
Because geo-location is not accurate and never has been. They are probably getting the location of the closest junction box.
With me, it found the data center where my ISP operates from - miles away.
See this article.
Geolocation of course depends on the available position measurement methods. If the browser only has the IP address then it will be very inaccurate, but if it has access to a a GPS device like in a smartphone it will be pretty good.