Google maps in the role of navigator - google-maps

guys!
I have follow question.
I am writing an application that will track movement of user + other options.
I plan to use Google maps for this.
I assume to send in some way gps coordinates to the google maps server.
The question is do I need to be always re-initialize and load the map.
It would be nice to do it without restarting.
Because this application is mobile I would like to avoid a lot of traffic and have a quick response.

What are you trying to accomplish with this app? From your question
do I need to be always re-initialize and load the map
it seems you're thinking about accessing the Google Maps website directly. The ideal way to write an application would be to use the Google Maps APIs. It also depends if you're developing your application to Android, iOS or a completely different beast. For Android you can take a look here. To avoid a lot of traffic, you can build a backend that your mobile app would talk to.

Related

Offline equivalent of google maps

So I have this issue where I'm developing a local web application and sometimes I might not have internet access. I do know that GMaps isn't all that happy when it loses internet connection so I was wondering whether there's a way of saving the state of a part of google maps (tiles, markers and lines for a zone/city). Or a google map equivalent that would let me do something like that, by which I mean building graphical asses on a map zone and keep that state even if the uses loses internet connection
There are several frameworks that enable an offline usage of OpenStreetMap, e.g. osmdroid if you are working with Android.
Welp, I found all I needed here: http://wiki.openstreetmap.org/wiki/OpenLayers_Local_Tiles_Example

Can I use Google maps for a non web-based project?

I would like to know if I can use the maps of Google Maps in a non web-based application. I would use "screenshots" only, or something like that.
I'm trying to understand Terms of services but sounds a little bit complicated to me... :(
Can you help me?
Thank u in advance :)
If you mean entirely without a data connection then no. Speaking about the web API licence agreement then all maps must be public facing and accessible by all to meet the conditions. See section 9.1. The application must not be behind a firewall etc.
You can however use them offline with the Android or IOS API's or simply print a map for personal use if that's what you're looking for?
Considering you want to use it in a game I would say no, at least not without contacting Google and confirming. I would suggest looking into Open Street Maps as an alternative. The map tiles are open source and thus downloadable.

Google Earth or Google Maps?

I have 3 weeks to develop a prototype. Bascially a fleet management system, browser based. It will be tracking tractors in open country, using low data rate satellite modems to report vehicle location on a regular basis.
I am struggling to get a grip on whether I want to use Google Earth or Google Maps:
ease of implementation (PHP/HTML 5, pulling data from a MySql database)
tracking each vehicle, drawing a line, toggle display of time and/or distance travelled at each location
visual appeal to user (given that it is open country, no real landmarks)
available overlays (rainfall, temperature data, elevation, etc)
anythign else?
I am toally at a loss on the mapping part (the reast I can do). Is one of Google Earth / Maps "best " for me? (not wanting to start a religious war)
Is it possible to use both and toggle between them?
Any other advice? I am googling like crazy and might not normally post this question before doing more research, but the dealine is ricdicuous. I am look at 16 hour days and need all of the help and advice that I can get. I will will have to live with the decision that I make now and I don't want to make a hasty one based on scant knowledge.
Thanks in advance...
[Update] oic. Google Earth is PC applicaion and Gogole maps is browser based. Well, I guess that that answers that, then.
[Update] Sigh! It's another of those where the head of the company uses an I-pad but the end users have Windows desktops. So he wants it browser based "just in case" he wants to look at it (which he might do twice in the first week and then never again). Why does it always seem to be this way?
To identify the right solution, you first need to identify your target audience for your app.
Will the users of the web-based app be using desktops, iPads, or
mobile devices that have Google Earth available?
Will the intented users be using large screens located at the data center (Google Earth or Google Maps will work) or remote users in the field (Google Maps might be best better fit)?
Not all mobile devices support the Google Earth application and the
mobile devices have a limited feature set.
Google Maps API, on the other hand, will run on nearly all web
browsers for a multiple of devices.
See details:
Google Earth for Mobile
http://www.google.com/earth/explore/products/mobile.html
Google Maps for Mobile
http://www.google.com/mobile/maps/
Also note if you use Google Earth API you can easily mashup Earth and Maps in single web application but again this requires those platforms that support the Google Earth client.
Here's a sample demo to try out:
http://earth-api-samples.googlecode.com/svn/trunk/demos/drive-simulator/index.html
Future proof your application. It is my impression Google Earth is on it's way out. It is hardly maintained and with browser makers actively discouraging the use of these plugins it is only a matter of time.
If you choose to use the Google mapping tools, do have a close look at Google Maps. Although Google currently offers a 3D version of Google Maps, it is not yet available for application developers. We are still stuck with 2D maps.
However, I expect that the maps API will not change drastically once 3D applications are allowed.
I am a specialist in the use of Google Earth API (planetinaction.com) and I have shifted from Google Earth to Google Maps wherever possible.
As an intermediate solution, you could build a maps based app but allow a 3D view option by popping up a Google Earth plugin. this keeps Google Earth dependencies to a minimum.

Dynamically Generate Google Maps API Key?

I'm building an application that dynamically creates websites for people on my server which they can then point their domain to using easy tools based off of cpanel XMLAPI. The website they build includes e-commerce stuff and google maps and more.
Everything works pretty smoothly except for the fact that my very non-techie clients will have no idea how(or why) to apply for a google maps api key (even though there is a simple place for them to upload/change it in the admin for my site). Once they access their site through their domain name, they'll need their own key.
Is there a way to dynamically generate a key? Maybe through cURL? I'm not very experienced w communication btw diff sites but am willing to learn.
Use Google Maps API v3, the current version of the API. It does not require an API key. Unless their sites will get a lot of traffic, that should solve the problem. For more information on what consititutes "a lot of traffic", see http://code.google.com/apis/maps/faq.html#hightrafficsite.

developing location/map based web site

I wanna start developing a map-based web site.
At first I ordered a regulat Gps device just to test the site, later on I would like to use Iphone's gps and other cell devices.
So I need something pretty generic.
I searched the web for map-based development framework and come up with too many of them :
Geo server, Map server, Open layers, Geoext , Google maps's api , and more.
I'm not a seasoned web developr (more of a c++ kind of guy) so I need something pretty straightforward , though robust at the same time.
Moreover, I need one which is free, and won't have licensing problem down the road.
At first I just need basic capabilities as displaying the gps data on my web site in real-time.
Can someone experienced recommend one ?
Thanks
Client
I'd go with OpenLayers - this is an opensource JavaScript client library, similar to the Google Maps API, or Bing API. However OpenLayers will free you of any licensing worries, or changing APIs as the source is available and can be modified - this is not the case with the Google/Bing/Yahoo APIs. You can however use the data from these services as layers in OpenLayers and drop them if they suddenly become filled with adverts or have commercial restrictions.
Have a look at examples to see if there is one you can use to make your first test application - http://openlayers.org/dev/examples/
GeoExtJS is a collection of extra tools and widgets that work with OpenLayers, built on top of another JavaScript framework ExtJS - also open source. ExtJS is mainly used for building user interfaces - data entry forms, grids etc. using JavaScript, to display in the browser.
If you are looking for tree structures to switch layers on and off and other more advanced UI widgets then GeoExtJS is worth looking into.
Server
If you are only displaying points then you can create dynamic KML or GeoJSON on your web server and reference this in OpenLayers. There are libraries in all languages that you can build on. Python has become a key languages in geospatial technologies, and has GeoJSON libraries you could script with.
GeoServer and MapServer are both server-side programs that allow you to serve out spatial data from databases with symbology, labelling etc. If you are having lots of different datasets then its worth spending time setting this up.
MapServer is written in C++ so it is probably easier for you to try this - however you may be able to get away without needing any specialist server side software, especially if your data consists of X,Y / Lon,Lat values that can be easily plotted as points.
For the beginning (you said that you need to show gps position in a real time) I think that Google Maps are good option here. This solution has very simple API and community support is also an advantage here (I've never compared with something else but I have good experince with GMaps and its tutorials/resources). This is for the client side, for server side any web framework should do the work (I use Django and it also have dupport for some geo things - mentioned later in this answer).
You need probably to build application that follows this rules:
Your GPS device sends data to your server(web application) periodically, data is stored in a db.
Users use browser to display data with map (eg. Google Map) which updates position periodicaly on some scheduled interval (eg. ajax calls to the server for the most current position). Each time response is recieved map need to be updated.
I don't know if there are more specialized solutions for this case.
If you need to improve your application and add some features you need to consider some more sophisticated geo frameworks. I have heard some positive opinions on GeoDjango, mainly because it can be easily incorporated with Django(which is very easy web framework to learn and it has a lot of capabilities).
All technologies I mentioned here are free.
I can recommend using the Google Maps API to render your maps in a browser. You can find my reasons in this answer.
The current version of the API has support for getting geo-location information for mobile devices.
I use Bing Maps for mobile. Mainly because its fast, and provides much better looking maps, 3d models, and satellite views for the UK than Google maps does.
I have also had issues with Google changing their service to provide some enhancements and it breaking my app, where at least with the Bing API theres a bit more compatability considered for existing apps. Not that I dont like the Google maps, I do. Its a backup service for me..
I generate maps from both providers, Bing as the primary, Goole secondary... this means that if ones offline of not working, which happens, my users still get to use my app.
Heres a link to Bing Maps Dev on a WIndows Phone for example
I'd take a look at Cloudmade. They have a number of API's, free options, paid options and use OpenStreetMap which for many places is one of the most accurate mapping solutions out there.
free , open source:
www.openstreetmap.org,
u can build ur own server as well using the same technolgogy:
http://weait.com/content/build-your-own-openstreetmap-server
API: http://wiki.openstreetmap.org/wiki/OpenLayers
Although its still in draft form, HTML5 will be supporting Geolocation API. Most major browsers and hand held devices should be supporting it in the near future and should make life a lot easier for developers who want a service independent solution. You would however still need a mapping service like google maps if you need to display locations.
function showMap(position) {
// Show a map centered at (position.coords.latitude, position.coords.longitude)
}
// One-shot position request.
navigator.geolocation.getCurrentPosition(showMap);
EDIT:
Its already supported in several major browsers:
Mozilla Firefox: supported in Firefox
3.5 and later versions.
Chrome: Supports thru Google Gears
Geolocation API
Opera: Supported in
nightly builds
Safari: Support is
coming soon in the IPhone’s Safari
browser.
Internet Explorer:
experimental support available from
IE8.