Hey I'm new with google map api. Please let me know if I can make an app which shows current location and direction at the same time.
You can use jQuery mobile with Google maps v3 plugin.
Google maps v3 plugin for jQuery, jQuery UI and jQuery Mobile takes away some of the head aches from working with the Google Map API. Instead of having to use Google event listeners for simple events like click, you can use jQuery click events on the map and markers.
[Exmaples]
Basic map example
Basic map example with geolocation
Related
The standard Google Street View Panorama on the https://www.google.com/maps looks like this.
When we click somewhere on the road, we'll go there with the "move" (or "slide") effect.
But when I try to add Google Street View Panorama to my site using Google Maps JavaScript API v3, I don't get this movement effect, just images change when I click on the road, without any effect.
Is there a way to obtain such effect using Google Maps JavaScript API?
No, nothing documented anyway.
https://developers.google.com/maps/documentation/javascript/streetview
https://developers.google.com/maps/documentation/javascript/reference#StreetViewPanorama
I am developing a web page which uses the Google Earth plugin. I would like to display the map like in the first image with the "Earth" and "Satellite/Map" view options like you can in Google Maps, or at least be able to just show the map in "Satellite/Map" view:
Currently this is what the view looks like:
Is this possible?
Yes, you can use the Google Maps V3 to switch between Google Maps and the Google Earth Plug-in.
The google-maps-utility-library-v3 can be used to make this easier.
You can see a working example here.
Alternatively you can simulate a reasonable map view buy just turning of the terrain and photo imagery and turning on the borders and roads layers in the Earth Plug-in. If you then lock this view to 'plan' it works well.
I'm using Google Earth API for Google Maps v3 to display kml files in a window which can then be switched between Maps and Earth browsers. This is a different plugin to that officially provided by Google, and I've run into a problem dynamically switching kml in the Earth window. I use checkboxes to switch them in the Maps API V3, window, but when the browser is switched to Earth it no longer listens to the checkbox actions. Essentially what I'm trying to do is a replication of the interactive checkbox example on the google code playground, but I think I should be using the Maps V3 scripts?
I've included a link to the example script here:
http://commondatastorage.googleapis.com/webgistank/TRMM_Checkbox_Example.html
Any help is greatly appreciated!
Regards,
Kerry
You have errors in your code. For example, the line
google.maps.event.addListenerOnce(map, 'tilesloaded', addOverlays);
references the non-existent function addOverlays
Also, I'm not sure what you mean...
"This is a different plugin to that officially provided by Google"
...as it is the exact same plugin.
You also state that...
"...it no longer listens to the checkbox actions."
It is the browser listens for the actions, not the Earth plug-in. The checkboxs event are still firing, the reason the code doesn't work is that the "Google Earth Api" (the api for controlling the plugin) uses totally different objects and methods to the Google Maps Api (the api for controlling the map). Things like google.maps.KmlLayer just don't exist in the Earth Api at all. So when the checkbox event fires it causes and error because you are calling methods on objects that don't exist.
From looking at your code, after initialising the Earth plugin via
googleEarth = new GoogleEarth(map);
You don't do anything else with it...You mention in your question the interactive checkbox example on the Google code playground, but as far as I can see you haven't actually implemented any of the code from that example.
Take another look at the function loadKml method in that example - it clearly shows how to load and display data in the Earth plugin.
I am wondering if it is possible to customize the default InfoWindow that pops up when the user clicks on various businesses that Google displays on its default map (see screenie). I would like to add functionality to let people "pin" these locations if they have stumbled on them while just browsing the map.
It is not currently possible to listen to any click event on the POI icons so overriding/modifying the info window is not possible.
File a feature request asking for it.
i don't know customizing the functionality of infowindow, but by using google infobox we can customize the look, from that you can try the functionality. because infobox uses pure html code.
http://google-maps-utility-library-v3.googlecode.com/svn/tags/infobox/1.1.9/src/infobox.js
Is there a way to use the "My location" button that exist on Google Maps in your own webbapplication using the javascript api?
I have read about adding controls here Google Maps Javascript API V3 Controls but I haven't found anything about the "My locaton" control.
There's currently no geolocation button in Google Maps API v3. But it's not difficult to implement one yourself.
Information about implementing geolocation can be found in the Google Maps Javascript API documentation.
If you want to add a geolocation button as a map control, read the Custom Controls section of the Google Maps documentation.