开发者

Second Marker not placed in a google map

I have a google map here that is supposed to place 2开发者_如何转开发 markers. One for tree location and one for trailhead location.

The tree location is not set, although the lat/lng is recognized. Any idea what may be causing this problem?

The url with the source is here: http://www.comehike.com/outdoors/widget.php?type=hike&hike_id=108&width=500&height=500

Thank you! - Alex


I see both markers in the map.

The problem with Google Maps is that it sometimes caches the markers strangely. What I sometimes do is just change the name of the file with markers when I want it fresh.


When you reference your javascript file, which I'm assuming from the comments of Cz's answer is created by PHP, add a timestamp to the end of the filename.

If the page is already using PHP: <script type="text/javascript" src="myjavascript.php?<?php echo date('Ymdhi'); ?>"></script>

Example using javascript only:

var script = document.createElement('script'); script.type = 'text/javascript';
    script.src = 'myjavascript.php?' + new Date().getTime();
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(script, s);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜