I have successfully worked out for 2 days and made a program for my arduino to reply me it's gps location coordinates to my mobile phone whenever I send a command to it through sms, but now I want to track it by gprs using 2g network so that I can track it 24x7,But I have no idea how to do this,I saw few tutorials that uses xively.com to graph the incoming data,but in this case my arduino will be transmitting gps coordinates ,so is there any easy way to store these values and directly locate them using google maps?Thanks in advance,please help me.
I would recommend that you send two strings to xively: one with your lattitude coordinates and one with your longitude. Then, I would recommend that you fetch that data using the google maps api.
Related
currently I would like to build an app for showing users' GPS coordinates. GPS data will be send through the POST to server and it will be store in database. From client side there will be input for typing username, then google map will appear with current user's position. I would like to build that app using React and Express+node, is it good idea? What will be the best way to do that? How can I send GPS data from server to react and generate it on map? Thanks for answers.
The hardest thing you have to solve is getting GPS data from map, and setting map position using GPS position you have from request.
Apart from that, you just can store GPS data on some DB, using Express+Node - that seems like a suitable solution.
You will just need DB connection, and a route, that handles POST(sending GPS coordinates), and GET(getting GPS coordinates) methods
I'm working on new application in my workplace as described below:
We have tens trucks working for us. I've installed a GPS module on each of them to track their position and store their coordinates in a database.
I need to see their movements in real time on a map (Google Maps, or Bing Maps) but I don't know how to do this.
I don't want code or snippets, I prefer Guidelines and API Docs or framework to build it!
If you have any question ask without problem! Thanks guys
Since you have the data in a database, the first step would be to expose that data to your app. There are a couple of different ways to do this depending on the type of app you want to create, however the most universal solution would be to create a web service that any of your apps can connect to. Here are a couple of good blog post on how to create spatial web services.
http://blogs.bing.com/maps/2013/07/31/how-to-create-a-spatial-web-service-that-connects-a-database-to-bing-maps-using-ef5
http://blogs.bing.com/maps/2013/08/05/advance-spatial-queries-using-entity-framework-5
Once you have a web service you can then create the app that will display the truck locations. You have a lot of options here; web, mobile, desktop (WPF, Windows app), cross platform. Web apps tend to be the most common as they can be accessed from the most locations. Connecting to a REST service from JavaScript is fairly easy. There is a number of different ways to load in real time data. The easiest is to use a timer that calls your web service regularly and grabs all truck locations. A slightly more complex option, but more efficient is to timestamp the last update of each location and then keep track of the last timestamp used to request an update. By doing this you can limit your request to only retrieve updates that have occurred since the last request. This would significantly reduce your bandwidth and make your app faster. Displaying the actual truck location on a map is easy. Your web service will return the location information, likely as either two number properties (i.e. latitude/longitude) or as a well known text string (simply parse this as shown in the previous blog posts). If using Bing Maps and you have two number properties, you can create a pushpin and add it to the map like this:
var loc = new Microsoft.Maps.Location(latitude,longitude);
var pin = new Microsoft.Maps.Pushpin(loc);
map.entities.push(loc);
Here are some useful resources around developing with Bing Maps:
https://www.bingmapsportal.com/ISDK/AjaxV7
https://msdn.microsoft.com/en-us/library/dd877180.aspx
Note, if you use Bing or Google maps (or just about any other major mapping platform), they require all asset tracking applications to have a license to use the maps. If you use Bing Maps, you can find details on licensing here: https://www.microsoft.com/maps/licensing/licensing.aspx#mainTab4
I'm building a twitter app on node and socket.io that should display the locations of streaming twitter data on a google map in real time. I'm having trouble figuring out the best way to grab the location from the Twitter Streaming API. The API has a coordinates attribute, but only 1-2% of all tweets have this data available, which kind of defeats the point of what I'm doing. There's also a location attribute for each user, which seems more promising. Given that user input/format is unpredictable, my current solution is to manually create a hash of US states/major cities with coordinates (in geo json- to feed to google maps) and reg ex to match with the user's location strings. Does anybody know of a better way to do this?
You can create a filter for the Streaming API which will only show you Tweets which have location information.
I assume, from your question, that you're only interested in messages from within the continental USA?
In which case, add the following parameter to your streaming request
locations=24.431150,-123.574219,47.683144,-59.238281
That's roughly the bounding box - you can adjust as you see fit.
I have searched for information on data and data security when using the Google Maps API, but I haven't been able to find anything that answers my specific question. We were looking to use Google Maps to to plot our customers and overlay some other information on top. I have all the customer details (name, address, postcode, Lat, Lon and other key details) in a file and have been using some test data. I have successfully been able to plot the test data on Google Maps and it looks like it is exactly what I would want to use.
The question I have is what data is sent to Google for the map to be rendered - does all of my data go external, or am I just pulling the maps back to the browser and rendering the data locally within the browser (ie. no data goes externally).
Thanks
Your additional data are never sent to Google servers. All the map is built in JS, so once you have loaded Gmap scripts, there is no need to sent data.
You can check that in your browser developer console : no additional AJAX request are made to Google, once the first one for displaying map is finished.
If you use geocoder or directions service (and maybe other services, but I have never use them), you have to send addresses or LatLng to Google via AJAX in order to make calculation.
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