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.
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">
https://developers.google.com/maps/documentation/javascript/
Version | Date | Description |
---|---|---|
1.0 | 18/01/2006 | |
2.0 | 02/05/2007 | |
3.0 | 11/11/2007 |
I don't understand why this work.... But THANK YOU SO MUCH!!!!
By joaco on 28th February 2016Thank you soooooooooo much!
I've been struggling with this for quite a while now.
Hi! I'm suffering this problem too and I'm interested about the concrete reason this is happening.
Where have you found the info to fix the problem? Thanks!
There's no need to create an account or provide unnecessary details. Just your comment.