google.maps.MarkerOptions title special characters

1,253 views
Skip to first unread message

Gemma Pumpr

unread,
Nov 16, 2010, 11:17:16 AM11/16/10
to google-map...@googlegroups.com
Hi folks
I have a map that has a lot of places mentioned that have html encoded characters in, such as ô etc. While the infowindow displays them correctly, the marker title displays them as the actual html code. Is there a function I need to call?
Many thanks in advance.
 
 

Chad Killingsworth

unread,
Nov 16, 2010, 11:47:08 AM11/16/10
to Google Maps JavaScript API v3
I'm betting you need to place the unencoded characters in the title
properties. They are probably being double encoded.

Chad Killingsworth

Gemma Pumpr

unread,
Nov 16, 2010, 11:53:53 AM11/16/10
to google-map...@googlegroups.com
There are properties for the title? Could you point me in the correct direction please?

Chad Killingsworth

unread,
Nov 16, 2010, 1:28:29 PM11/16/10
to Google Maps JavaScript API v3

Esa

unread,
Nov 16, 2010, 5:09:01 PM11/16/10
to Google Maps JavaScript API v3


On Nov 16, 6:53 pm, Gemma Pumpr <gemma.pu...@googlemail.com> wrote:
> There are properties for the title? Could you point me in the correct
> direction please?

'title' option of Marker constructor creates 'title' attribute to the
marker html element. So the rules for Marker 'title' are equal to html
'title' rules.

Basicly you cannot use html entities like &ocirc; or any html tags in
title. If you have utf-8 character set on your page and in your code
editor, and you can find the special character on your keyboard, you
can use it with no trouble.

<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
Reply all
Reply to author
Forward
0 new messages