User:SignpostMarv Martin/Webmap API Examples

From Second Life Wiki
< User:SignpostMarv Martin
Revision as of 10:23, 11 May 2009 by SignpostMarv Martin (talk | contribs) (starting article)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This article covers the refactored javascript for the SLURL Map API made by SignpostMarv Martin for Open Hack 2009.

Base HTML

<html4strict><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Hack Day '09: Pluggable SLurl!</title> <meta http-equiv="Content-Type" content="application/xhtml+xml;charset=UTF-8" /> <script src="http://maps.google.com/maps?file=api&v=2&key=ABQIAAAA_7eLK3UI1MLX_NkCb5B9ChR_3tPE69LMEQxQ2vuQ-hnyTC7mmBSoDhER_y6z_P14WZxbqcwFcYpKJg" type="text/javascript"></script> <script src="http://www.google.com/jsapi?key=ABQIAAAA_7eLK3UI1MLX_NkCb5B9ChR_3tPE69LMEQxQ2vuQ-hnyTC7mmBSoDhER_y6z_P14WZxbqcwFcYpKJg" type="text/javascript"></script> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js" type="text/javascript"></script> <script src="http://static.marvulous.co.uk/%C2%B5/js/slurl/mapapi.js" type="text/javascript"></script>

<link rel="stylesheet" type="text/css" href="http://slurl.com/_styles/MAIN.css" /> <script type="text/javascript"> /*<![CDATA[*/ $(document).ready(function() { mapInstance = new SLURL.map(document.getElementById('map-container')); mapInstance.gotoRegion('Hippotropolis'); }); $(document).unload(function() { // Google script that helps prevent memory leaks // (we're looking at you when we say that IE!) GUnload(); /*]]>*/ }); </script> </head> <body>

</body> </html></html4strict>