Logic, but in a different way

Daft Logic

Can't Display Polylines on a Google Map

Last Updated 11th November 2007

Description

You can use the Google Maps on your own website to provide a range of useful services. One feature available via the API is the polyline feature to join two markers using a line. This has many good uses where two markers need to be associated with each other.

Unfortunately there is a common problem where the polyline wont display , and there will be no obvious error messages. After some research a fix was found to this problem.

This issue is more likely to occur in internet explorer.

Solution

Place to following code inside the <head> tag of your page

<style type="text/css">
v\:* {
behavior:url(#default#VML);
}
</style>

Also , use :

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml">

in the header instead of....

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

Relevant Links

http://www.google.com/apis/maps/

Version History

Version 1 :18/01/2006

Version 2 : 02/05/2007

Version 3 : 11/11/2007

Previous Comments For This Page

No comments yet, be the first !

Add your own comment below and let others know what you think:

Comments :

Your Name (optional) :