Removing restaurants, hotels etc. from the roadmap

21,631 views
Skip to first unread message

mapblogger

unread,
Aug 23, 2011, 11:45:03 AM8/23/11
to google-map...@googlegroups.com
Hi,

since today there are restaurants and hotels displaying in the roadmap of my map. How can I disable this layer?

Thanks in advance!

Chris Broadfoot

unread,
Aug 24, 2011, 4:12:54 AM8/24/11
to google-map...@googlegroups.com
Hi, you can disable the business icons by making them invisible using a map style.

The relevant style is

[
  {
    featureType: "poi.business",
    elementType: "labels",
    stylers: [
      { visibility: "off" }
    ]
  }
]

You can use "styles" in MapOptions to apply the style across the roadmap, hybrid and terrain map types.

Hope that helps
Chris

--


--
You received this message because you are subscribed to the Google Groups "Google Maps JavaScript API v3" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-maps-js-api-v3/-/mmt61pJMR8QJ.
To post to this group, send email to google-map...@googlegroups.com.
To unsubscribe from this group, send email to google-maps-js-a...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-maps-js-api-v3?hl=en.

Pil

unread,
Aug 24, 2011, 4:34:34 AM8/24/11
to Google Maps JavaScript API v3
Have you seen this?

http://googlegeodevelopers.blogspot.com/2011/08/business-icons-and-styling-across.html


I see this as a further step of Google to delight everyone with more
and more and more adds.
(It's really not the first step in this direction.)

Since it's in fact possible to turn off all PR icons, the result in
this case would be that also all street names and other meaningful
labels are turned off.

So it doesn't seem there is an easy way to revert back to maps that
have been seen as 'normal' yesterday.

In any case I think you'd have to play around a few hours to find a
somewhat acceptable compromise of what you would like to show and what
not.

But as I said: It never will look like yesterday's maps.

mapblogger

unread,
Aug 24, 2011, 1:46:15 PM8/24/11
to Google Maps JavaScript API v3
Thanks, it's good that you can disable these layers. But it would be
better if they are disabled by default or you can add some code like
this google.maps.MapTypeId.ORIGINALROADMAP

I'm using the 3.5 version now. I don't want to style the map and the
map should not change from this to that in a day!


On 24 Aug., 10:34, Pil <wolf...@gmail.com> wrote:
> Have you seen this?
>
> http://googlegeodevelopers.blogspot.com/2011/08/business-icons-and-st...

Thor Mitchell (Google Employee)

unread,
Aug 25, 2011, 7:09:00 PM8/25/11
to google-map...@googlegroups.com
I'm not sure I understand the comment "the result in this case would be that also all street names and other meaningful labels are turned off". Take a look at the demo in the blog post. Deselect poi.business. The street names and other labels stay visible, but the business icons disappear.

Note also that these Place icons are not Ads. It is not possible for a third party business to pay Google to display icons for it's locations, or influence in any way the algorithm by which we select which to display. We display these icons on Google Maps because they add valuable additional local context. In general any difference in behaviour between Google Maps and the Maps API is a source of frustration and confusion for developers. By adding these icons to the API we apply the principle of least astonishment (with respect to the application of sensible defaults), while preserving a way for developers who prefer the previous default style the choice to opt-out.

Finally, and we can not say this enough, if you do not want to be surprised by unexpected change, do not use v=3. Load the version of the API you need (eg. v=3.5). We deliberately held this change until a version rollover, so that any developer who has specified a version would get at least 6 months notice of the change before it affected their site. If you choose to use v=3 then you are living on the bleeding edge, and you should expect the unexpected.

Many thanks,

Thor.

Gary Little

unread,
Aug 25, 2011, 8:25:30 PM8/25/11
to Google Maps JavaScript API v3
People may also want to turn off "poi.medical" to prevent pharmacies
-- which I feel are more like businesses than medical facilities --
from being displayed (of course this would also affect hospitals).

On Aug 24, 1:12 am, Chris Broadfoot <c...@google.com> wrote:
> Hi, you can disable the business icons by making them invisible using a map
> style.
>
> The relevant style is
>
> [
>   {
>     featureType: "poi.business",
>     elementType: "labels",
>     stylers: [
>       { visibility: "off" }
>     ]
>   }
> ]
>
> You can use "styles" in MapOptions to apply the style across the roadmap,
> hybrid and terrain map types.
>
> Hope that helps
> Chris
>
> --http://twitter.com/broady

Pil

unread,
Aug 26, 2011, 4:54:44 AM8/26/11
to Google Maps JavaScript API v3


On Aug 24, 7:46 pm, mapblogger <kai.la...@gmail.com> wrote:

> I'm using the 3.5 version now. I don't want to style the map and the
> map should not change from this to that in a day!


I think that's the point: It's always a good idea to release new
features and to continue development.

But as soon as a new feature becomes the default one, people have to
fiddle around with their existing map - either instantly or six months
later.


Or people are enforced to accept unchangeable restrictions, like
continous zoom,
using the draw method,
restricted waypoints in direction queries,
cumbersome accessible maps canvas projection,
cumbersome feasible fixed info window size,
suddenly appearing as default raiseOnDrag for all markers,
suddenly and completely changing the return values of all API events
(although they were documented),
and, and, and....

Andrew Leach

unread,
Aug 26, 2011, 9:54:36 AM8/26/11
to Google Maps JavaScript API v3
On Aug 26, 9:54 am, Pil <wolf...@gmail.com> wrote:
>
> I think that's the point: It's always a good idea to release new
> features and to continue development.
>
> But as soon as a new feature becomes the default one, people have to
> fiddle around with their existing map - either instantly or six months
> later.

I concur. The "principle of least astonishment" applies to developers
as well. New features should default to the state they had before
their introduction -- so for example, if business icons are
introduced, they should default to "off"; but if (say) existing labels
become optional they should default to "on". **Then** it's up to the
developers how they make their map match Google Maps and provide the
*user* with least astonishment (the map they use changing, or that map
not matching Google Maps). Google are becoming almost as paternalistic
as Microsoft, and that's a comment which hopefully Larry Page wouldn't
have dreamt of ten years ago.

And pharmacies are definitely businesses, not medical establishments.

Thor Mitchell (Google Employee)

unread,
Aug 27, 2011, 6:32:48 AM8/27/11
to google-map...@googlegroups.com


On Friday, 26 August 2011 14:54:36 UTC+1, Andrew Leach wrote:
On Aug 26, 9:54 am, Pil <wol...@gmail.com> wrote:
>
> I think that's the point: It's always a good idea to release new
> features and to continue development.
>
> But as soon as a new feature becomes the default one, people have to
> fiddle around with their existing map - either instantly or six months
> later.

I concur. The "principle of least astonishment" applies to developers
as well. New features should default to the state they had before
their introduction -- so for example, if business icons are
introduced, they should default to "off"; but if (say) existing labels
become optional they should default to "on".

That's a sure fire way to end up with a really ugly programmatic interface. It means that any new developer who starts using the API and wants their map to behave as closely to Google Maps as the API supports (which is normally the case) has to explicitly opt-in to every new feature that has been added to the API since it was first launched.

There is also the issue of feature discoverability. We learned the hard way in v2 that expecting developers to discover features and opt-in to them is unrealistic. You end up with 95%+ maps doing nothing more than the absolute minimum (a few default markers). We want new Maps API apps to be as featureful as possible, and existing Maps API apps to benefit from the work we are doing (or we might as well just stop doing it). To do this, we ensure that v=3 delivers the most complete experience we can offer, but we recommend that you opt-out of that experience in production so you don't get caught out.

Use v=3 in your development environment though, and you will see the improvements as they happen, and can decide on a case by case basis how to respond before they hit your production environment.

Many thanks,

Thor.

gary

unread,
Jan 8, 2018, 8:58:20 PM1/8/18
to Google Maps JavaScript API v3
Wow - you guys are focused on new and cool stuff (your opinion) even if it gets in the way of using maps for something primitive, like a map.  


Remember, just because you can doesn't mean you should.
Reply all
Reply to author
Forward
0 new messages