When using the Google Maps API for android or ios it seems that the indoor maps are enabled by default and the "floor picker" control automatically appears when you zoom in to a building that has indoor maps. How can I get similar functionality in the Google Maps API for javascript (i.e. targetted at a desktop browser)? In particular, I would like to show a floor picker control and be able to change between floors just like at maps.google.com.
Google doesn't support this in the Javascript API currently.
These three issues all have responses from Google stating that it's an "Enhancement", which may mean they'll add it sometime:
https://code.google.com/p/gmaps-api-issues/issues/detail?id=6642
https://code.google.com/p/gmaps-api-issues/issues/detail?id=6792
https://code.google.com/p/gmaps-api-issues/issues/detail?id=6783
The only workaround I'm aware of is to manually add your own floor picker, then add each floor as an ImageMapType and switch between them. Unfortunately, this requires you to provide all of the floor imagery yourself rather than use Google's.
ImageMapType docs: https://developers.google.com/maps/documentation/javascript/examples/maptype-image-overlay
Related
Google Maps give opportunity to user to look on
Earth from space.
But Google Maps Javascript API 'Satellite' version allows to you zoom only to
this version
How can I get view from Google Maps like at first screenshot? Thank you for help.
You are talking about loading a web-gl rendered globe instead of imagery map tiles. This functionality has not been released to the javascript API. Google has started releasing some of their web gl functionality such as being able to toggle 3d mode in bigger cities but the "earth global view" web-gl functionality are lacking.
I want to add a 3D layer showing cloud location and elevation on a Google Maps.
The idea is that when you tilt the map (ctrl+drag in Earth mode) you could see how high each cloud is.
I found this article which explains how to add 3D buildings but it's "fakes", cheating with the latitudes to get some height effect:
http://johndyer.name/drawing-3d-objects-and-building-on-google-maps/
I couldn't find anything up to date in the doc.
Google seems to be silent about 3D features in Javascript API. Closest I can get to this are Styled Maps but nowhere does it specifically indicate 3D. Only Android implementations are available as of now.
I did some research and found this library which help you build 2D and 3D: https://github.com/OSMBuildings/OSMBuildings
Another option is Cesium JS:
An open-source JavaScript library for world-class 3D globes and maps
https://cesiumjs.org/
I currently use Google maps embeds to display places information like this: https://developers.google.com/maps/documentation/embed/guide#place_mode
The big problem with embeds is the scrollwheel and mobile touch drag. Therefore, I'm converting it to the Javascript API where you can set options to take care of those issues. However, I need to know how to display places information as per the default google map style (I don't want to create my own custom infowindow and all).
How can I use the default places information display from google maps?
How do I get Google Maps to stay this way:
I don't want it to show the marker point.
My solution was to use setTimeInterval with gmap.setCenter by step 1 sec to make a setCenter works. When the map is in full-screen the setCenter function works. But I think this solution is not good for my app.
Another detail is that the map is set so that it only appears when you click an option. So the map is hidden in another div.
I also tried to idle the event of gmap, but it doesn't work.
You probably don't need help anymore, but I give you my answer for feature the same question.
Google Maps API v3 is designed for PC browser, which has large memory and better network (than smartphone), so it is not suitable for PhoneGap.
Google provides Google Maps Android API v2 and Google Maps SDK for iOS, which are able to load maps faster, but you need to them with Java and Objective-C.
phonegap-googlemaps-plugin helps you to implement those Google Maps into your PhoneGap/Apache Cordova easily.
So if you try to embed Google Maps into your app next time, try it.
phonegap-googlemaps-plugin
I have done google map in UIWebView and it works perfectly with routing stuff and all. But now i want to load some other map into the WebView and get all the features that i get from google maps. How can i do it?
For eg: I want to load this one to the UIWebView. http://stage.discoveritalia.it/conbipel/ .This is an italian map. I want to use it in the same way as google maps works in an iphone app. Plz help me.
Since you are using normal web-based Google Maps in a UIWebView and not UIMapKit you approach this as any other Google Maps implementation using JavaScript.
The way this is done is by defining a custom map tile layer. See the Google Maps API documentation for custom tiles for more information.
Note that beside the actual programming, you need to have (and the rights to use) the actual map tiles as well.