I'm using KML to overlay shapes on a Google map. Information corresponding to each shape is included in the <description>
element, along with a link to a detail page corresponding to that shape.
So for example, my KML includes this:
<description>
<![CDATA[
<div>
...
<p>
<a href="Concession.20.aspx">View details</a>
</p>
</div>
]]>
Of course, I would like for that link to open in the same window, since it's just navigating to another page on this same site. Unfortunately, as documented here, links embedded in the <description>
element of a KML file are rewritten with target='_blank'
.
Targets are ignored when included in HTML written directly into the KML; all such links are opened as if the target is set to _blank. Any specified targets are ignored.
My question: Can anyone think of a workaround that would override this (obnoxious, IMHO) behavior and force these links to open in the same window?
As an example of one approach, I'm currently trying to override the click event on these links (using jQuery), but they're generated dynamically by Google maps and I can't seem to get a hold of them early enough.