Styling the main ROADMAP

175 views
Skip to first unread message

Gallacci

unread,
Jun 1, 2010, 11:29:25 AM6/1/10
to Google Maps JavaScript API v3
Fellows,

Is there a way to apply styles to the original
google.maps.MapTypeId.ROADMAP?

I've been trying to find out on my own with no luck.

Thanks,

Marcelo Gallacci

Miguel Angel Vilela

unread,
Jun 1, 2010, 11:38:56 AM6/1/10
to google-map...@googlegroups.com

Hi Marcelo,

I'm not sure what you're asking, you can style only road map tiles using this:

Styled Maps

Other map types (satellite, terrain) can't be styled like this.

Cheers,
Miguel


--
You received this message because you are subscribed to the Google Groups "Google Maps JavaScript API v3" group.
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.


Gallacci

unread,
Jun 1, 2010, 12:58:45 PM6/1/10
to Google Maps JavaScript API v3
Hello, Miguel.

I am sorry. I should have outlined the word "original". The idea is to
apply styles to the default RoadMap.

I have already applied styles successfully to a road map type but I
could not replace the "original" road map with the styled version.

Thank you,

Marcelo

Miguel Angel Vilela

unread,
Jun 1, 2010, 5:06:18 PM6/1/10
to google-map...@googlegroups.com

I'm sorry but I still don't get it, can you share sample code with us?

If you apply styles to the roadmap type, you should see the styled maps, don't you?


--

Jonathanccwong

unread,
Jun 4, 2010, 6:12:24 PM6/4/10
to Google Maps JavaScript API v3
You can create a styled map that uses the road tiles. I suggest you
play around with this:

http://gmaps-samples-v3.googlecode.com/svn/trunk/styledmaps/wizard/index.html

I got a "simplified" map type that rid the map of words, basically
what i wanted to do is to make the map more clear with bigger text
(but i am still looking into that) so at the moment I am just clearing
the map and making it simple.

One other limitation (let me know if anyone figured this out) is that
you can't apply the Traffic or Bicycle layer onto a styled map. It
seems to do ok on the hybrid and terrain map, but if you add a traffic
layer on a styled map, nothing seems to happen. Anyone know why?

Jon

On Jun 1, 2:06 pm, Miguel Angel Vilela <mig...@google.com> wrote:
> I'm sorry but I still don't get it, can you share sample code with us?
>
> If you apply styles to the roadmap type, you should see the styled maps,
> don't you?
>
>
>
> On Tue, Jun 1, 2010 at 18:58, Gallacci <galla...@gmail.com> wrote:
> > Hello, Miguel.
>
> > I am sorry. I should have outlined the word "original". The idea is to
> > apply styles to the default RoadMap.
>
> > I have already applied styles successfully to a road map type but I
> > could not replace the "original" road map with the styled version.
>
> > Thank you,
>
> > Marcelo
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Google Maps JavaScript API v3" group.
> > 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<google-maps-js-api-v3%2B unsub...@googlegroups.com>
> > .

Gallacci

unread,
Jun 6, 2010, 1:21:43 PM6/6/10
to Google Maps JavaScript API v3
Miguel,

Thank you for your reply.

I am able to apply styles to a roadmap type using new
google.maps.StyledMapType() and can see it when I do
map.mapTypes.set() and map.setMapTypeId().

The result I am trying to get is to replace the unstyled roadmap with
the styled one. I think I would be able to do it either by applying
styles to the roadmap that already is on the mapTypes stack or by
removing the unstyled roadmap from the stack and adding the styled
one. I haven't found a way to do any of these options, though.

Marcelo

On 1 jun, 18:06, Miguel Angel Vilela <mig...@google.com> wrote:
> I'm sorry but I still don't get it, can you share sample code with us?
>
> If you apply styles to the roadmap type, you should see the styled maps,
> don't you?
>
>
>
> On Tue, Jun 1, 2010 at 18:58, Gallacci <galla...@gmail.com> wrote:
> > Hello, Miguel.
>
> > I am sorry. I should have outlined the word "original". The idea is to
> > apply styles to the default RoadMap.
>
> > I have already applied styles successfully to a road map type but I
> > could not replace the "original" road map with the styled version.
>
> > Thank you,
>
> > Marcelo
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Google Maps JavaScript API v3" group.
> > 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<google-maps-js-api-v3%2B unsub...@googlegroups.com>
> > .

Gallacci

unread,
Jun 6, 2010, 2:40:19 PM6/6/10
to Google Maps JavaScript API v3
I finally found the way to get the desired behaviour. All I had to do
was to define the array of mapTypeIds on the mapTypeControlOptions
including my styled version of the roadmap instead of the traditional
roadmap.

I've got an additional question at this point: since the name that is
used on the control is the name defined on the StyledMapTypeOptions,
how will the control react to different locales? Looks like I have to
do it by myself, isn't it?

Thanks,

Marcelo
Reply all
Reply to author
Forward
0 new messages