Text along polylines

1,330 views
Skip to first unread message

MrUpsidown

unread,
Aug 21, 2011, 6:17:08 AM8/21/11
to Google Maps JavaScript API v3
Hi folks,

I am looking for a way to display a simple polyline (a line between 2
points) and to display some text along the line (in the same
direction). Basically like if I was displaying a street with the
street name following the street path. Only it will be straight A to B
lines.

I know how to draw polylines but I am unable to think of a way to
display the text as I want.

Any ideas?

TIA,
Upsidown

upsi...@bluewin.ch

unread,
Aug 24, 2011, 4:23:24 AM8/24/11
to google-map...@googlegroups.com
Hello,

Anybody on that one?
After searching for hours, I guess there is no easy way to do that. Could someone confirm?

Any idea on how to achieve this?

Best regards,
Upsidown

----Message d'origine----
De: upsi...@bluewin.ch
Date:
21.08.2011 12:17
À: "Google Maps JavaScript API v3"<google-map...@googlegroups.com>
Objet: [Google Maps API v3]
Text along polylines

Hi folks,

Any ideas?

TIA,
Upsidown

--
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-maps-
js-a...@googlegroups.com.
To unsubscribe from this group, send email to google-maps-js-api-
v3+unsu...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-maps-js-api-v3?hl=en.


Chris Broadfoot

unread,
Aug 24, 2011, 4:27:57 AM8/24/11
to google-map...@googlegroups.com
Sorry Upsidown,

I haven't seen any example of someone doing this. It's certainly possible using an OverlayView, with some SVG or VML and a bit of maths.

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.

upsi...@bluewin.ch

unread,
Aug 24, 2011, 4:40:58 AM8/24/11
to google-map...@googlegroups.com
Thanks Chris for your answer.
Would it be interesting to develop a class for that?

Best regards,
Upsidown

----Message
d'origine----
De: cb...@google.com
Date: 24.08.2011 10:27
À: <google-map...@googlegroups.com>
Objet: Re: [Google

Maps API v3] Text along polylines

Sorry Upsidown,

I haven't seen any example of someone doing this. It's certainly
possible
using an OverlayView, with some SVG or VML and a bit of maths.

Chris

--
http://twitter.com/broady

On Wed, Aug 24, 2011 at 6:23 PM, upsi...@bluewin.ch <upsi...@bluewin.ch>wrote:

>
Hello,
>
> Anybody on that one?
> After searching for hours, I guess there is no easy way to do that. Could
> someone
confirm?
>
> Any idea on how to achieve this?
>
> Best regards,
> Upsidown
>
> ----Message d'origine----
> De:
upsi...@bluewin.ch
> Date:
> 21.08.2011 12:17

> À: "Google Maps JavaScript API v3"<google-maps-js-api-v3@googlegroups.

Chris Broadfoot

unread,
Aug 24, 2011, 6:05:47 AM8/24/11
to google-map...@googlegroups.com
Definitely, that'd be awesome. Check out the MapLabel utility library for a start:

Even if it's just implemented in Canvas, it'd be interesting.

--


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

upsi...@bluewin.ch

unread,
Aug 24, 2011, 7:46:54 AM8/24/11
to google-map...@googlegroups.com
That looks great indeed. I will have a look as soon as I find some time!
Thank you for your input.

Best regards,

Upsidown

----Message d'origine----
De: cb...@google.com

Date: 24.08.2011 12:05
À: <google-maps-js-api-v3@googlegroups.


com>
Objet: Re: [Google Maps API v3] Text along polylines

Definitely, that'd be awesome. Check out the MapLabel

Even if it's just
implemented in Canvas, it'd be interesting.

--
http://twitter.com/broady

On Wed, Aug 24, 2011 at 6:40 PM, upsi...@bluewin.ch <upsi...@bluewin.ch>wrote:

>
Thanks Chris for your answer.
> Would it be interesting to develop a class for that?
>
> Best regards,
> Upsidown
>
>
----Message
> d'origine----
> De: cb...@google.com
> Date: 24.08.2011 10:27

> À: <google-maps-js-api-v3@googlegroups.

Reply all
Reply to author
Forward
0 new messages