Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Allow Further Zoom on Google Maps v3 Satellite View

I have some very high resolution aerial imagery that I would like to display over a satellite view base map. My imagery is good enough to generate images up to zoom level 23. However, Google's satellite view only allows zooming in to level 20. I know that I can manually switch the map type to my custom overlay once the user zooms in to level 20 (so only my map type is shown), but then I lose the Google imagery for a full zoom level.

My question is, is there some way to register for an event once the zoom reaches level 20, where the client is attempting to zoom in further but can't? If not, are there other ideas on how I can enable further zooming without losing the Google imagery at level 20?

The only other solution that I can come up with is to create a second custom tile server that simply forwards requests on to the standard Google tile url, but that offers a different min/max zoom. If this idea is the way to go, I would like to get confirmation on that as well. Thanks.

like image 532
Jeff G Avatar asked May 09 '15 05:05

Jeff G


People also ask

How do I zoom in further on Google Maps?

You can zoom in and out of the map with one hand. Double tap a spot on the map, and then: Drag down to zoom in. Drag up to zoom out.

How many zoom levels are there in Google Maps?

The Google Maps API provides map tiles at various zoom levels for map type imagery. Most roadmap imagery is available from zoom levels 0 to 18, for example.

How do you zoom in on a Satellite?

Open the Chrome browser. Go to join.zoom.us. Enter your meeting ID provided by the host/organizer. Click Join.

How to zoom in on Google Earth map?

After you get the result, switch to the Satellite view by clicking the square icon (with “Satellite” as its caption) on the bottom-left of the map screen. Now zoom in using the + (plus) button present on the right-bottom of the map screen.

What is Max zoom in Google Maps API?

Also see the Maps JavaScript API Reference: Max Zoom The Google Maps API provides map tiles at various zoom levels for map type imagery. Most roadmap imagery is available from zoom levels 0 to 18, for example. Satellite imagery varies more widely as this imagery is not generated, but directly photographed.

How to use Google Maps satellite view?

Follow the steps below to use the above tricks: First of all, search for a place on Google Maps. After you get the result, switch to the Satellite view by clicking the square icon (with “Satellite” as its caption) on the bottom-left of the map screen. Now zoom in using the + (plus) button present on the right-bottom of the map screen.

How do I get Google Maps to magnify a spot?

First, find a spot on Google Maps and zoom in as far as the "+" button above the magnification slider on the left edge of the map allows. Be sure to stop short of going into Street View, if the location you're gazing at supports it.


1 Answers

I determined that the simplest solution is to overload the function where the zoom range is changed, using the following incredibly hacky code:

var zoomRangeModifier = googleMap.__proto__.__proto__.__proto__;
var originalSetFunc = zoomRangeModifier.set;
var hijackedSetFunc = function(name, value) {
    if (name === 'maxZoom') { // Old API: name === 'zoomRange'
        value = 23;           // Old API: value.max = 23;
    }
    originalSetFunc.call(this, name, value);
};
zoomRangeModifier.set = hijackedSetFunc;
like image 103
Jeff G Avatar answered Oct 21 '22 14:10

Jeff G