Ok, always seem to try, what seems to be, complicated stuff.
What I am after is putting www.sharethis.com widget inside every infowindow. There might be lots of stuff i'm assuming can happen, and there is probably a much easier route then as comlex as i approach but, here goes. I came across this: http://www.xelawho.com/map/markurl2.htm Cool, generates a unique url. I tried to 'fit' it in around my testing page here: http://creativemaps.vism.ag/indexinfowindowurl.htm Now I load markers from an xml and I put it inside: <Placemark> <name>Natural History Museum of Los Angeles County</name> <description><![CDATA[ <script type="text/javascript" src="http://w.sharethis.com/button/buttons.js"></script><script type="text/javascript">stLight.options({publisher:'32e78673-44d5-48be-8e1c-9578aa7393cf'});</script> <script src="http://platform.twitter.com/widgets.js" type="text/javascript"></script> <style type="text/css" media="screen"> #custom-tweet-button a { "entities" : { "urls" : [ { "display_url" : "*<input type="text" id="markerbox" style="width:400px"></input>*", } ], ... }, } </style> <div id="custom-tweet-button"> <a href="http://twitter.com/share" class="twitter-share-button" data-url="<a href="javascript:myclick(' + (gmarkers.length-1) + ')">' + name + '<\/a>" data-counturl="<a href="javascript:myclick(' + (gmarkers.length-1) + ')">' + name + '<\/a>" data-count="vertical" data-via="visualthinkmap">Tweet</a> </div><td/><td> <span class="st_facebook_vcount" st_url="<a href="javascript:myclick(' + (gmarkers.length-1) + ')">' + name + '<\/a>" displayText="Share"></span> <span class="st_email_vcount" st_url="<a href="javascript:myclick(' + (gmarkers.length-1) + ')">' + name + '<\/a>" displayText="Email"></span> <span class="st_sharethis_vcount" st_url="<a href="javascript:myclick(' + (gmarkers.length-1) + ')">' + name + '<\/a>" displayText="Share"></span></td></tr> </TABLE> <br> ]]> </description> <address>900 Exposition Boulevard Los Angeles, CA 90007, United States (213) 763-3466</address> <styleUrl>#Museums and Galleries</styleUrl> <Point> <coordinates>-118.288795,34.017284,0.000000</coordinates> </Point> </Placemark> Now I assume I can use javascript inside the infowindow, the bold underlined part is from my site as this displays the unique url to the infowindow, i want to pull the url into the sharethis. As I say its probably a redundant way to do what i wanted to make a unique url for infowindow. I used the share this on my blog and it pulls the unique url from php, how can i put the share this into the info window and it detect the url generated from xelawho link? btw, didnt need a sidebar as with the xelawho link but thought function myclick(i) would still work as a marker has to be clicked. If you have an easier way with the code that i already have i'll try that. any help greatly appreciated as always. ps been testing to put it inside Natural History Museum of Los Angeles County (had to zoom out slightly to see it). -- You received this message because you are subscribed to the Google Groups "Google Maps JavaScript API v3" group. To view this discussion on the web visit https://groups.google.com/d/msg/google-maps-js-api-v3/-/mbVcUXejRSgJ. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-maps-js-api-v3?hl=en.
