Change font size, style, etc... of directions

4,304 views
Skip to first unread message

easy_golfin

unread,
Dec 1, 2010, 5:40:31 PM12/1/10
to Google Maps JavaScript API v3
Is there anyway to manipulate the font style, size, etc.. of the
directions that appear when using the Google Maps API V3? Perhaps
through javascript or CSS? I tried looking but couldn't find anything.


Thanks

Chris Broadfoot

unread,
Dec 2, 2010, 12:13:00 AM12/2/10
to google-map...@googlegroups.com
Do you mean in the InfoWindow or the panel?


--
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.


easy_golfin

unread,
Dec 2, 2010, 2:06:21 AM12/2/10
to Google Maps JavaScript API v3
The DirectionsPanel, the directions that are returned.

Like in this one:

http://code.google.com/apis/maps/documentation/javascript/examples/directions-panel.html

The route that is returned on the right hand side of the map once a
city is selected.

On Dec 1, 9:13 pm, Chris Broadfoot <c...@google.com> wrote:
> Do you mean in the InfoWindow or the panel?
>
>
>
>
>
>
>
> On Thu, Dec 2, 2010 at 9:40 AM, easy_golfin <turbinator...@gmail.com> wrote:
> > Is there anyway to manipulate the font style, size, etc.. of the
> > directions that appear when using the Google Maps API V3? Perhaps
> > through javascript or CSS? I tried looking but couldn't find anything.
>
> > Thanks
>
> > --
> > 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>
> > .

Chris Broadfoot

unread,
Dec 2, 2010, 4:40:38 AM12/2/10
to google-map...@googlegroups.com
Sure. Since you provide your own DOM element to contain the step-by-step instructions, you can apply your own styling to that container.

Here's a super ugly example:

Cheers
Chris

To unsubscribe from this group, send email to google-maps-js-a...@googlegroups.com.

easy_golfin

unread,
Dec 5, 2010, 3:07:22 AM12/5/10
to Google Maps JavaScript API v3
The link provided says it seems to be broken... Would you happen to
have any other example?

On Dec 2, 1:40 am, Chris Broadfoot <c...@google.com> wrote:
> Sure. Since you provide your own DOM element to contain the step-by-step
> instructions, you can apply your own styling to that container.
>
> Here's a super ugly example:http://savedbythegoog.appspot.com/retrieve_cache?unique_id=edbfc17ed5...
>
> Cheers
> Chris
>
>
>
>
>
>
>
> On Thu, Dec 2, 2010 at 6:06 PM, easy_golfin <turbinator...@gmail.com> wrote:
> > The DirectionsPanel, the directions that are returned.
>
> > Like in this one:
>
> >http://code.google.com/apis/maps/documentation/javascript/examples/di...
>
> > The route that is returned on the right hand side of the map once a
> > city is selected.
>
> > On Dec 1, 9:13 pm, Chris Broadfoot <c...@google.com> wrote:
> > > Do you mean in the InfoWindow or the panel?
>
> > > On Thu, Dec 2, 2010 at 9:40 AM, easy_golfin <turbinator...@gmail.com>
> > wrote:
> > > > Is there anyway to manipulate the font style, size, etc.. of the
> > > > directions that appear when using the Google Maps API V3? Perhaps
> > > > through javascript or CSS? I tried looking but couldn't find anything.
>
> > > > Thanks
>
> > > > --
> > > > 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><google-maps-js-api-v3%2B

Chris Broadfoot

unread,
Dec 5, 2010, 5:12:51 PM12/5/10
to google-map...@googlegroups.com
Sorry about that. Try this:


Chris

To unsubscribe from this group, send email to google-maps-js-a...@googlegroups.com.

Chris Broadfoot

unread,
Dec 5, 2010, 5:38:21 PM12/5/10
to google-map...@googlegroups.com

easy_golfin

unread,
Dec 6, 2010, 1:45:04 AM12/6/10
to Google Maps JavaScript API v3
Thanks, I got it to work. Although, can you explain why it doesn't
work without the style sheet that is referenced in the code?

The CSS contains

html { height: 100% }
body { height: 100%; margin: 0px; padding: 0px }

Without that, it doesn't seem to work.

On Dec 5, 2:38 pm, Chris Broadfoot <c...@google.com> wrote:
> ... and a live link:
>
> http://geoapis.appspot.com/agdnZW9hcGlzchMLEgtFeGFtcGxlQ29kZRjRjAEM
>
>
>
>
>
>
>
> On Mon, Dec 6, 2010 at 9:12 AM, Chris Broadfoot <c...@google.com> wrote:
> > Sorry about that. Try this:
>
> >https://gist.github.com/raw/33687bbee5747d969267/directions-panel-css...
>
> > Chris

geoco...@gmail.com

unread,
Dec 6, 2010, 8:54:20 AM12/6/10
to Google Maps JavaScript API v3
On Dec 5, 10:45 pm, easy_golfin <turbinator...@gmail.com> wrote:
> Thanks, I got it to work. Although, can you explain why it doesn't
> work without the style sheet that is referenced in the code?
>
> The CSS contains
>
> html { height: 100% }
> body { height: 100%; margin: 0px; padding: 0px }
>
> Without that, it doesn't seem to work.

That css allows the browser to calculate the size of the map div and
report it correctly to the API. Without it browsers report zero size
for the div and you can't see the map.

-- Larry

Migu

unread,
Dec 21, 2010, 9:10:17 AM12/21/10
to google-map...@googlegroups.com
Hello Guys,
do You have any idea on how to change font-size on any infoWindow generated by a click event on the directionsPanel?
I'm going mad to discover that...

Cheers

 
Reply all
Reply to author
Forward
0 new messages