Use the standard google maps interface on embedded maps / google maps API - javascript

This surely sounds like a silly question in my head, but I want to put it out there nonetheless just to make sure I haven't missed anything.
I've got a page on my website that has a google map (currently 'embedded' through the google maps api v3).
While I'm perfectly capable of interacting with that map through a custom form (and the google map api):
an input box to set starting point
an input box to set endpoint
a dropdown list for transportation modes
I was wondering if it was possible (in comes the silliness) to use google's own interface for this (cause users are used to this).
Abstracting my question: Is there a way to "bring in" Google Maps' own UI on an embedded map and do some calculations on my own page, based on the routes (/modes of transportations, etc) that are being selected in that UI.
My guess: no. The google maps UI is something that can only show up on maps embedded with an iFrame (so only on maps.google.com) and no interaction with it is possible, at least not in a kosher way.

There is the direction API which you can use to obtain responses (JSON or XML) regarding useful information such as distance, start coordinate, travel mode, etc. You can interact with the response to obtain what is needed for your web page.
I have posted a link for the direction API. Hope this can help.
Direction API

Related

Converting iFrame Business Maps to Javascript API maps for dark mode

I have always worked very effortlessly with Google Maps and their iFrame which displays the business on the webpage with their information, like this.
How is this possible with the javascript API? I have succesfully made a dark map with that, but I want to display the business also. Do I have to use another API for that?
I dont believe this is possible using only the google maps api. You could use the Google Places api https://developers.google.com/maps/documentation/javascript/places#place_details.
Then you would need to create your own display for the information. I dont think there is any way to get this kind of functionality right out of the gate.

How to Integrate Google Map JavaScript API V3 without Internet in Web Application? [duplicate]

Like Nokia's OVI maps can be used offline, there must be some way of caching Google map tiles too. Any hints?
If you are trying to cache the tiles that Google serves, that may be a violation of Google's Terms of Service (unless, under certain circumstances, if you've purchased their enterprise Maps API Premier). That's why gmapcatcher has it crossed off their list. See http://code.google.com/p/gmapcatcher/issues/detail?id=210.
At the gmapcatcher URL above, you will also find a shell script that can download tiles (or so its author says).
There are also other projects that try to make Google Maps available offline:
http://code.google.com/p/ogmaps/
http://code.google.com/p/gmapoffline/
Lastly, if Google Earth can meet your needs, then you can use that. Offline usage of Google Earth requires a Google Earth Enterprise license according to http://www.google.com/permissions/geoguidelines.html.
Note that the preceding page also says: "You may not scrape or otherwise export Content from Google Maps or Earth or save it for offline use." So if you try to cache tiles, that will almost certainly be considered (by Google, anyway) a violation of the Terms of Service.
Unfortunately, I found this link which appears to indicate that we cannot cache these locally, therefore making this question moot.
http://support.google.com/enterprise/doc/gme/terms/maps_purchase_agreement.html
4.4 Cache Restrictions. Customer may not pre-fetch, retrieve, cache, index, or store any Content, or portion of the Services with the exception being Customer may store limited amounts of Content solely to improve the performance of the Customer Implementation due to network latency, and only if Customer does so temporarily, securely, and in a manner that (a) does not permit use of the Content outside of the Services; (b) is session-based only (once the browser is closed, any additional storage is prohibited); (c) does not manipulate or aggregate any Content or portion of the Services; (d) does not prevent Google from accurately tracking Page Views; and (e) does not modify or adjust attribution in any way.
So it appears we cannot use Google map tiles offline, legally.
update:
I found the terms of use from Google Map:
Section 10.5
No caching or storage. You will not pre-fetch, cache, index, or store
any Content to be used outside the Service, except that you may store
limited amounts of Content solely for the purpose of improving the
performance of your Maps API Implementation due to network latency
(and not for the purpose of preventing Google from accurately tracking
usage), and only if such storage: is temporary (and in no event more
than 30 calendar days); is secure; does not manipulate or aggregate
any part of the Content or Service; and does not modify attribution in
any way.
It means we can cache for limited time actually
On http://www.google.com/earth/media/licensing.html there is a "Mobile" section containing :
Similar to our online terms, if you use our APIs or a mobile device’s native Google Maps implementation (such as on an Android-powered phone or iPhone), no special permission is required, but you must always keep the Google name visible. Offline caching of our content is never allowed.
You can use Open Street Map : you will find dozens of different layers and map types, and this is absolutely free. You can download all the map tiles you want. And of course, as anyone can enhance the map, it displays more information than Google's maps.
If you need help, you can ask the community which is also very active.
On Android platforms, Oruxmaps (http://www.oruxmaps.com) does a great job at caching all WMS sources. It is available in the play store.
I use it daily in remote areas without any connectivity, works like a charm.

How to prevent Google Maps API v3 from caching tiles (to save storage space)?

I have a strange issue regarding caching of the Maps js API for which I couldn't find any solution.
My situation is as follows:
We want to display a simple website including a map based on Maps API v3.
The website shall be displayed on an embedded device which uses a modified WebKit engine.
Therefor displaying and using Google Maps works great.
But here comes the problem:
Our embedded device has only few storage space (maybe a few 100 KBs).
The Maps API caches every map tile (which usually makes sense!!!), so after the user is moving around the map for some time, we get an error that the cache is full.
Is there any possibility to tell the Maps API not to cache the tiles, to only cache a specific number of tiles, or even to remove the cached tiles programatically by ourselves?
I couldn't find any approach or solution regarding this issue, so it would be really great if somebody has an idea.
Thank you in advance
Markus

Creating analytics map similar to Google Analytics

I'm building an admin panel here at work and recording some ip data from users who are downloading our itunes mp3's. We have the ip and location of the user, but I'd like some way of displaying that visually. Is there any jquery plugin or addon that would allow me to display the stats I collected visually on a map similar to the way Google Analytics does it?
Have you tried the Google Chart Tools api (https://developers.google.com/chart/) ?
There is a geo chart which I think is exactly what you are talking about.
https://google-developers.appspot.com/chart/interactive/docs/gallery/geochart
https://code.google.com/apis/ajax/playground/?type=visualization#geo_chart
jVectorMap could also be suitable here.

Get iPhone location data into a Google Maps

I am looking to develop a feature for a browser app I am developing. I was hoping to get any advice on this topic:
A user walks around with their iphone.
During this time location data is recorded of their walk
This data can then be exported to Google Maps and I can see the route overlaid on a Google Map in my browser.
Is this possible? Where would I start and how would the data be recorded?
Yes, this is possible (assuming you want to use Javascript as it is tagged to your question).
Getting the location data on an iPhone is possible, see this question. You can use the Google Maps API to display a map and draw the recorded path on it. I would rather display the walked route direct in your app rather than exporting/importing coordinates of the recorded route.
Before implementing the App, I would take a look on both Google Maps API and OpenStreemMap API to find out which you like more and fits your needs best. Playing with some examples before implementing your app might be a good point to start with.

Categories

Resources