1

I know that Google map baselayer can be used in Leaflet like this:

googleMap = L.tileLayer('http://{s}.google.com/vt/lyrs=s&x={x}&y={y}&z={z}',{ maxZoom: 20, subdomains:['mt0','mt1','mt2','mt3'] }); 

The Google Maps base layer is showing usually not all the points of interests as you know in Google lot of points of interests are hidden only when you type them in search they will appear. How to have all points of interests even the hidden one all visible in Google Maps baselayer implemented in Leaflet? Point of interest shown in native google map Point of interest hidden in baselayer google map in leaflet

  • 1
    Please show a screengrab of your leaflet map in comparison to a map with the POI you are hoping to show. I suspect its because the Google Maps web site is the base layer plus overlays for things like POIs and you'd need to add them as separate layers via the Google API... – Spacedman Jun 16 at 10:19
  • Using Google map baselayer in Leaflet like this is not allowed by Google Terms and thus illegal, unfortunately – nadya Aug 23 at 16:21
3

You can't. Google does not let developers to control the amount of POIs being shown, and does not let developers download POI sets. Furthermore, each GMaps user will see more or less POIs depending on their own search history.

(And this is your periodic reminder that using GMaps' tiles goes against Big G's terms of service; and that's why GoogleMutant exists)

POI visibility depends on things like POI density, localization (longer names take more screen real estate and less POIs can be shown) and Google's mysterious algorithm to give some POIs higher priority than others (which you won't have any control of).

You can hide POI categories by providing custom map styles to the GMaps JS API (which is also supported in GoogleMutant), in the hopes that that'll leave space for other POIs, but that's about it.

(And this is your periodic reminder that using OpenStreetMap allows anybody to display POIs in whatever fashion they like)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.