Guest RossSadler Posted December 16, 2009 Share Posted December 16, 2009 HI, I'm definitely struggling getting google maps to work. js link in header <script src="javascripts.js" type="text/javascript"></script> of in styleTemplates/global/index.tpl js file: // JavaScript Document <!-- function MM_swapImgRestore() { //v3.0 var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a)&&x.oSrc;i++) x.src=x.oSrc; } function MM_preloadImages() { //v3.0 var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array(); var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++) if (a.indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a;}} } function MM_findObj(n, d) { //v4.01 var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) { d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);} if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[n]; for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers.document); if(!x && d.getElementById) x=d.getElementById(n); return x; } function MM_swapImage() { //v3.0 var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3) if ((x=MM_findObj(a))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];} } function MM_setTextOfLayer(objId,x,newText) { //v9.0 with (document) if (getElementById && ((obj=getElementById(objId))!=null)) with (obj) innerHTML = unescape(newText); } function initialize() { if (GBrowserIsCompatible()) { var map = new GMap2(document.getElementById("map_canvas")); map.setCenter(new GLatLng(51.160931, 0.256929), 15); map.setUIToDefault(); var point = new GLatLng(51.160931, 0.256929); var marker = new GMarker(point); map.addOverlay(marker); } } //--> and code in site admin>site docs>contact us <table border="0" width="510"> <tbody> <tr> <td> <div id="map_canvas" style="width: 510px; height: 400px;"> </div> </td> </tr> <tr> <td> <p>49-51 London Road Southborough Kent TN4 OPB </p> <p>Email:[email protected] </p> <p>Tel:01892 615916</p> </td> </tr> </tbody> </table> full url is :http://www.tigerlilyonline.co.uk/test_06/index.php?act=viewDoc&docId=2 any help appreciated!!!! Many thanks Quote Link to comment Share on other sites More sharing options...
leeofaccy Posted December 29, 2009 Share Posted December 29, 2009 Hi I am quite new to this but hopefully this might work for you. It might be better to embed the map, I have just tried it myself and it worked for me. Go to maps.google.com and get your map you want to insert. Then, at the top right of the map there is a link (Next to Print and Send). Click this and you are provided with a link to customise and preview embedded map. Make any changes you need then copy the code from the box and paste it into your page. If you are using the Rich Text Editor in the admin panel make sure you click the 'Source' button and paste it into there, where you want the map to appear. Hope that helps. Good luck! Lee Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.