WWWS on the map
Example of using a xml file with your public wwws that are displayed on a Google map.
<?xml version="1.0" encoding="UTF-8"?> <Module> <ModulePrefs title="Jouw publieke wiewatwaar op de kaart" summary="" description="" author="" author_email="" thumbnail="" screenshot="" height="260"> <Require feature="opensocial-0.7"/> <Require feature="dynamic-height"/> <Optional feature="content-rewrite"> <Param name="include-urls">.*</Param> <Param name="exclude-urls"></Param> <Param name="include-tags">link,img,style</Param> </Optional> </ModulePrefs> <Content type="html"> <![CDATA[ <script src="http://maps.google.com/maps?file=api&v=2&key=ABQIAAAAaUtu4ciH37L1dY4ocrVJ8BSr1uBYV4d3_BC2tRWTDZMuGQ27jhRN6dW304KEHCm8mckUZGi_-R-hZg" type="text/javascript"></script> <script type="text/javascript"> //Clean up document.body.onunload = function() { GUnload(); }; // key hyves-modules.nl = ABQIAAAAaUtu4ciH37L1dY4ocrVJ8BSr1uBYV4d3_BC2tRWTDZMuGQ27jhRN6dW304KEHCm8mckUZGi_-R-hZg var map; var geoXml; function loadMap(username) { if (GBrowserIsCompatible()) { geoXml = new GGeoXml("http://www.hyves-feeds.nl/rss/hyver/"+username+"/wiewatwaar/"); map = new GMap2(document.getElementById("content")); map.setCenter(new GLatLng(52.255549,5.061951), 9); map.setUIToDefault(); if(map.isLoaded()) { map.addOverlay(geoXml); gadgets.window.adjustHeight(); } } else { document.getElementById("content").innerHTML = '<p>We're sorry, but your browser doesn't support the Google Maps API.</p>'; } } function loadData(req) { req.add(req.newFetchPersonRequest('OWNER'), 'owner'); req.send(onLoadData); } function onLoadData(data) { var ownerdata = data.get('owner').getData(); var owner = ownerdata.getField(opensocial.Person.Field.PROFILE_URL); owner = owner.split("."); owner = owner[0].substring(7) html = new Array(); html.push(owner); var username = html.join('') loadMap(username); } function init() { var req = opensocial.newDataRequest(); loadData(req); } gadgets.util.registerOnLoadHandler(init); </script> <div id="content" width="100%" style="height:300px;"></div> ]]> </Content> </Module>
Example install (Make sure you're not in OpenSocial Sandbox mode)