My question is how does google map or mobile GPS able to find mine current location ?
My high level understanding after reading this article is , GPS receiver gets the location coordinates through these satellites
and this location is further passed to Google Map(or any other client) API which then locates the exact location on map. Is it correct ?
Somewhere i also read that Mobile towers also plays the role. But my unserstanding is that this can be used to track the mobile location if required but mobile apps or Google maps
uses the satellite approach. Right ?
It's a bit inaccurate question to ask "How does google map location works", because Google Maps app (as well as any application leveraging google maps API) is just a consumer of location services on your device and is not used to determine the current location itself.
Because Google Maps is just an application, it can be run inside browser, or as native application. Depending on that, the way how it gets to your location information may also vary.
If you run the Google Maps from web browser (or WebView, or UIWebView,..) it usually uses HTML 5 geolocation API to determine your location and then use that to show your position on Google Maps. HTML5 geolocation then uses some lower level services to get your location, like GPS sensor, WIFI, network etc. There are already questions on how HTML 5 geolocation determines your position on SO, like this one or this one.
If your app is run as standalone application, it depends on your platform, your device sensors, your network,.. how the location is determined. So for example on Android with GPS sensor, LocationManager is used, which retrieves the location again using GPS, or from network provider, or returns last known location, etc. There's a lot of various interesting techniques behind this, which you can look up yourself (For example to determine your location using Wifi, Google has a database of WIFI SSIDs and their locations retrieved using anonymous device tracking and is able to roughly tell your location only from Wifi networks around you.)
Related
Would it be possible make Google maps aware of our beacons via their registry or api or something, so that google map can accurately give indoor direction to users in a facility that is under our control(where we can deploy beacons)?
Example: In a mall we own, can we place beacons and submit them to Google Maps so it can give better results?
Some links I found, but can't figure out an answer:
https://developers.google.com/beacons/
https://developers.google.com/beacons/proximity/guides
https://www.google.co.in/maps/about/partners/indoormaps/
https://play.google.com/store/apps/details?id=com.google.android.apps.insight.surveyor
Google used to develop this beacon-based location service call Google Here but it was scrapped due to the reasons of privacy, but then you can do the following to get your beacons locationing up.
Let say you have multiple beacons in one mall.To make this explanation simple, just treat the indoor maps and normal maps as the same thing, and those beacons you going to add are like the places in the Google Maps.
First of all you need to make your building floor plan available on the Google Maps. You can do so by using the following steps to submit your beacons location with the floor maps of the building, so that your beacons location can be automatically align with your stores/building.
https://support.google.com/maps/answer/2803784?co=GENIE.Platform%3DDesktop&hl=en
After your floor plans appear on Google Maps, you can submit your beacons location using the Map Marker tool (Retired March 2017, moved to Google Maps after that).
You can then use the Google Maps API's Map Object to work with your indoor map, including getting location of all your beacons.
https://developers.google.com/maps/documentation/android-api/map#indoor_maps
The IndoorBuilding Object allows you to get the active level that you are accessing. You can use the function getLevels() to get all the levels in the building, and then use getActiveLevelIndex() to get active level you are working on.
After getting to the right floor, what is left is the interaction between Google Beacon API with the maps you created.
latLng and indoorLevel in the Proximity Beacon API would then return the exact location and detail level that your beacons located.
You can use this link to upload indoor map of a building.
https://maps.google.com/floorplans/find
Submit the details of floor and everything.
Hope it will help.
I believe there are no current plans to use registered beacons for directions indoors, or even for lat/long type location (more for semantic place inference), but I feel it is a very good FR so I went ahead and added it to the Android issue tracker:
Including support for BLE beacons in FusedLocationProvider.
Please star it to get updates.
As you can read in the other reply beacons can be used currently to improve indoor location accuracy for 3rd party apps, but it requires a lot of work by the developer and it is not supported by the Google Maps Mobile.
My requirement is, I have a set up of few IP cameras in a certain area. I have geo-location of each camera.All cameras are set-up in urban area. can I call these cameras on google-maps? is there any API for that ? i should get live feed, when I click on a particular camera .. Please help me
Google map not providing any API for controlling any type of hardware devices. If you want to control you have to set up everything yourself. Google map is an API for doing map or location operations like getting the latitude and longitude of a location, get the distance from one location to another, and a map view. In your case I don't think Google map can give any help.
You can start reading documentation of Google map from here
Apologies up front - I'm not overly technical but helping a developer partner find an answer to a problem. Feel free to be as technical as you like in response though. I'll get him to look at the answers!
We're trying to pull the location (GPS coords) of the red pin dropped in the google maps app when you do a search (on iOS or android), to use in a separate app.
The key to this is that it pulls the info you've already searched for in google maps, NOT having to search again within the second app. i.e. using google maps API in the second app is off the table.
Options so far seem to be...
1) Run an intent to request the data in the background. However, it seems that the intent has to push coordinates to the gmaps app, and can't just "ask" the coordinates of the current pin.
2) Use the google maps API to allow the user of the second app to login to their account so it can pull the account Maps history (i.e. can see the most recent place in the search history). However, it seems that the google maps API doesn't give access to this data.
3)....??
We're stumped. Any ideas?
Thanks so much!
Have you considered using a Geocoder to get the coordinate data? It'll depend on your use case (when and how "red pins" are created), but you can circumvent using maps with it.
I am developing GPS based Location reminder in j2me. I am little bit confuse to which maps i use??.....Google maps & Nokia maps. Which one allows me good working... The working of my app are as follows :-
-User will provide a string to app to search a place of his/her desire.
-Then according to given string app will show a place on map by pointing marker on map.
-User can save that place or he/she can select a near by place rather than searched place by clicking on map or any other way.
-app will save that searched place coordinates & remind when it reached to near that place.
-When app remind to user about already stored place... that place should show on map by pointing an marker along with the how far he is from his destination.
The real choice here lies in whether to use a RESTful API like the Google Static Maps (or Nokia's RESTful Maps) or to use a native Java ME mapping library plugin such as the Nokia Maps API for Java ME. The latter has several major advantages:
Static mapping services such as the Google Static Maps API or Nokia's
RESTful Map API do not cache or tile the images when requested,
therefore each request involves a round trip to the server. If the
map on a mobile application needs to be refreshed at any time, using
a caching library will result in a reduction in network traffic after
around three maps have been displayed. An explanation of this can be
found here
As the name implies, Google's Static Maps API can only retrieve over
http static images for a requested coordinate point, image size,
image type and zoom level. Newer libraries offer additional
functionality out of the box offering dynamic Map content and touch
support, where the user can move around his/her current position,
zoom in, zoom out, modify the view mode to satellite or translate an
address to a coordinate point and show that on the map, among others.
This abstraction of the underlying functionality is hidden from the
developer so much less coding is needed in order to achieve the same
result .
Terms and Conditions for Nokia Maps are easier to fulfil than
Google - No legal restrictions of using the API outside a web browser
application or need to provide a link to the native Google Maps App
(if there is one), or to Google Maps (if there isn't one).
Nokia currently offer higher free daily request limits. Nokia Maps
API for Java ME supports up to 50,000 render requests per day and per
unique IP address (as of January 2012), for Nokia Developer
registered users (free of charge) while the limit for Google's Static
Maps API is currently 1000 unique (different) image requests per
viewer per day.
A couple of years ago there wouldn't be a choice, only RESTful solutions existed, but these days I would say a static http solution should only be used if you want a simple single image
As an abstraction of the underlying services, there are already a full set of examples to cover most of your use cases:
-User will provide a string to app to search a place of his/her desire.
-Then according to given string app will show a place on map by pointing marker on map.
http://www.developer.nokia.com/Commu...PI_for_Java_ME
-User can save that place or he/she can select a near by place rather than searched place by clicking on map or any other way.
Maybe you need to use a draggable marker:
http://www.developer.nokia.com/Devel...ples/#standard
Or react to the touch and find a Geocoordinate:
http://www.developer.nokia.com/Commu...PI_for_Java_ME
-app will save that searched place coordinates & remind when it reached to near that place.
This is known as geofencing and is covered by the Location API:
- http://www.developer.nokia.com/Resou...ty-events.html
-When app remind to user about already stored place... that place should show on map by pointing an marker along with the how far he is
from his destination.
Showing a Map with a Marker
http://www.developer.nokia.com/Devel...ples/#standard
For distance calculations, I guess you'd be after the ROUTING example
http://www.developer.nokia.com/Devel...mples/#routing
http://www.developer.nokia.com/Commu...g_with_Java_ME
Now you could re-write and all these services from scratch using RESTful APIs (and then go about debugging your code) , but I'm sure you'll agree it would be much easier to use an existing, working and tested framework for the low level plumbing and then just write your code on top using the services.
It is possible to encapsulate RESTful service in Java ME. As an example, added below is a screenshot from an app encapsulating the suggestion service
It is just a lot easier when someone else has already done this work for you and placed it in a library.
Here's my situation; I've built a very simple web app that looks up a users location and plots it on a Google map.
Here's my code: http://pastebin.com/d3a185efd
When I test it, my location is detected as being >= 500 meters from where I actually stand.
BUT
When I open up Google Maps or Gowalla my location is correct to within <20 meters?
So my question is: Do native iPhone apps benefit from a higher accuracy rate than web apps?
If so, why?
According to the specification, webapp geolocation should use whatever positioning method works best in any situation - so in theory, one would assume it uses GPS when available. The discussion linked in the "best answer" by rohit doesn't seem conclusive to me - here is another one, with someone reporting a similar problem to yours and other users professing to getting accurate gps data (scroll down to comments 26-28 Sept):
http://www.thecssninja.com/javascript/geolocation-iphone
But it does seem like the geolocation stuff is buggy still. I'd suspect your problem is basically that, some bug.
Based on the following link, I believe you are getting coordinates in web app through tower triangulation and not using GPS. I really doubt if GeoIP can give coordinates within 500 meters.
http://phonegap.lighthouseapp.com/projects/20116/tickets/16-navigatorgeolocation-does-not-make-use-of-gps-data
The geolocation API allows for a high accuracy parameter.
http://dev.w3.org/geo/api/spec-source.html#position_options_interface
(But uses extra battery, so probably best use sparsely)
Have you tested that?
Boolean: enableHighAccuracy
I think you are getting different results since you are overlooking the aspect of time. The GPS uses lots of battery and only starts up on command.
The HTML5 getCurrentPosition takes a snapshot of the coordinates before the GPS has had a chance to accurately 'zone in' on your position. The Google Maps app on the other hand starts and then watches your position, accuracy increasing over time (you all know how the marker moves). HTML5 also supports this feature of watching the position.
Side note! In my experience from the iPhone, the device will actually store your position for a little while, meaning that if I start up Google Maps and let it 'zone in' on my position, close it and THEN start my webapp and use getCurrentPosition I get an equally accurate reading.
Accuracy is all about letting the GPS do its thing..
I think that a webapp relies on a geoip service that (does its best to...) converts your IP address into a GPS coordinate.
ex: service ex
However such way to retrieve a coordinate cannot be as accurate as the "classic" one that uses a GPS device (such as the one included in the 3G or 3Gs iphone) to really retrieve your actual location and not approximate it at its best like a geoip service.
UPDATE: GEOIP is used when using google maps on a laptop for instance, but maybe your question was : "when I use the HTML 5 position object in my web page, does it comes from the GPS hardware or from a geoip service ?". This I couldn't really tell, I would say it uses geoip service instead of GPS hardware but I'm not 100% sure...
The code doesn't show where you get position from - are you using Navigator and Geolocation objects?
http://developer.apple.com/iphone/library/documentation/AppleApplications/Reference/SafariWebContent/GettingGeographicalLocations/GettingGeographicalLocations.html
for google geo api first it tries to find your location by device gps , if failed it goes cell triangulation (virtual gps) if failed it try to use to wifi mac and ip addresses , the last try is to use the client IP to get his location