View from space via google maps - javascript

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.

Related

Map creation API for fictional interactive maps?

I want to make an interactive map web application for a game that I play. Basically I want it to be a kind of Google maps clone, where I have a vector-based graphic of the region area and I can zoom in and out to reveal certain level of detail.
My research into map APIs has returned little results. OpenStreetMaps and Google Maps only allow custom maps with real geolocation data. My project requires the creation of a map with nonexistent locations. Does anyone have a suggestion on how to approach this? Thanks.
I think you can use "real" GPS coordinates and then customise the base layer beneath. The GPS Lat Long coordinates (between -90 and +90 each) offer as good a scale as any to then locate your fictional positions.
Google Maps has an API that allows putting custom layers and base maps here:
https://developers.google.com/maps/documentation/javascript/maptypes#CustomMapTypes
OpenStreetMaps will also allow this. Some recommended guides available here:
https://switch2osm.org/serving-tiles/
Good luck!

Leaflet Map and Layer don't move at the same time when zooming in / out

I have a small issue in the application I am building currently, and I can't figure out what's the problem.
I am using leaflet for displaying the map, with a Google Maps layer as a map.
My problem is that when I am zooming in or out of the map, the actual maps move directly but it takes almost a second before the markers layer gets updated too.
You can reproduce my problem easily on this test server, by choosing on of the points of interest, and zooming in or out when the points are displayed.
I haven't found any reference of this problem on the internet so far. Do you have any idea where this could come from ?
Thanks!
This is using a Google Maps layer, which means it wraps the Google Maps API. Since the Google Maps API zooms at a different speed than Leaflet, you see this effect.
There's no quick fix here: it's just not a very good idea to use the Google Maps API within Leaflet, technically or legally. Either use Leaflet with tiles that can be used directly with it - OSM, MapQuest, Stamen, Mapbox - or use the Google Maps API.

Showing floor picker in google maps api for javascript

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

Google Maps is Slow to Load Map in PhoneGap

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

How to use anyother map like google maps in UIWebView in iphone?

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.

Categories

Resources