_Bat_ Posted February 28, 2007 Author Posted February 28, 2007 I could do it with PHP I guess. There is another rather long thread on this forum where I had to have a unique header code and body tag on several pages of my virtual tour. That was resolved with PHP so I should really just use the same code again (I hate frames )
webman Posted February 28, 2007 Posted February 28, 2007 The way I did unique HEAD includes on pages was to get the page ID or name (as long as it's unique) in the template/core file, then something like @include("inc/$page.php").
plugged_in Posted February 28, 2007 Posted February 28, 2007 Yeah thats what i would do aswell using $_GET['pageID'] create an if statement to show the various includes.
webman Posted February 28, 2007 Posted February 28, 2007 An If/Switch statement in this instance would slow it down if you wanted to do this for a large number of pages. Either checking the existance of the file to be included or surpressing the errors of the include function would be a quicker solution I think.
_Bat_ Posted February 28, 2007 Author Posted February 28, 2007 Quick question, I have just been playing with this and got around to changing the pin and realised that the pin doesn't appear at all in firefox (it works in IE). Do you have any idea why this might be? Thanks James
_Bat_ Posted February 28, 2007 Author Posted February 28, 2007 Nah, a gif (the changes I made are not live ATM, I just reverted it back to the original script while this issue is sorted).
plugged_in Posted February 28, 2007 Posted February 28, 2007 The best thing i can suggest is maybe just try a jpg. I haven't tried either gif or png. Sorry mate. Try that and let me know. You know you can insert whatever you want in the text that popsup, for example the school logo.
_Bat_ Posted February 28, 2007 Author Posted February 28, 2007 Okay, I will give it to a go when I get back to one of my computers (probably at work tomorrow). Right now i'm on my grans laptop because my aunt has kicked me off the computer so she can go to sleep in the room it is in, lol. Thanks for your help.
plugged_in Posted February 28, 2007 Posted February 28, 2007 o dear haha your gran has a laptop wow!! If i get time tonight i will try and have a look for you matey.
_Bat_ Posted February 28, 2007 Author Posted February 28, 2007 K I got it working... this is a brilliant script, I love it, thanks
plugged_in Posted February 28, 2007 Posted February 28, 2007 No worries mate. Anything else just let me know im online for like 20hours a day haha.
_Bat_ Posted March 1, 2007 Author Posted March 1, 2007 'Tis really weird, sometimes it works in firefox, but other times, like now, it just doesn't. *REMOVED* Does that link work in firefox for you? Does the school logo show? I am going to keep it as it is an excellent map, but I wish Firefox would behave (not often I have to say that about firefox).
plugged_in Posted March 1, 2007 Posted March 1, 2007 Sorry mate was in a meeting all day. Looked at your code what i can suggest is that you use single quote marks round the image/logo.gif so the code will be 'image/logo.gif' Try that and let me know.
_Bat_ Posted March 2, 2007 Author Posted March 2, 2007 Still doesn't work I've discovered that it doesn't work in the latest version of firefox, but I install firefox on my grans laptop a while back and it works in that version?
plugged_in Posted March 2, 2007 Posted March 2, 2007 Weird that is!! replace the whole line with. null,
_Bat_ Posted March 2, 2007 Author Posted March 2, 2007 replace the whole line with. null, Come again?
plugged_in Posted March 2, 2007 Posted March 2, 2007 Sorry mate was to early in the morning for me. Still hungover haha Doesnt matter i tried it as well and doest work. Damn now some of my sites dont work in FireFox. I will see if i can have a work around. I have emailed m$ to let them know. Also another tip. To use 3D maps change the script link. to
plugged_in Posted March 2, 2007 Posted March 2, 2007 I have created a fix that enables Firefox 2 to work with Virtual Earth with all the same features as Firefox 1.5 (polylines, pushpins etc). Add the following code before you create your map (but after you have included the Virtual Earth API): // If the browser is Firefox get the version number var ffv = 0; var ffn = "Firefox/" var ffp = navigator.userAgent.indexOf(ffn); if (ffp != -1) ffv = parseFloat(navigator.userAgent.substring(ffp + ffn.length)); // If we're using Firefox 1.5 or above override the Virtual Earth drawing functions to use SVG if (ffv >= 1.5) { Msn.Drawing.Graphic.CreateGraphic=function(f,b) { return new Msn.Drawing.SVGGraphic(f,b) } } // Put your own code below this line Enjoy mate 8)
_Bat_ Posted March 2, 2007 Author Posted March 2, 2007 K, i'm a little bit confused as to where the code has to go. Putting it where I assumed you meant didn't work
plugged_in Posted March 2, 2007 Posted March 2, 2007 Something like this after the head. <br /> // If the browser is Firefox get the version number<br /> var ffv = 0;<br /> var ffn = "Firefox/"<br /> var ffp = navigator.userAgent.indexOf(ffn);<br /> if (ffp != -1) ffv = parseFloat(navigator.userAgent.substring(ffp + ffn.length));<br /> // If we're using Firefox 1.5 or above override the Virtual Earth drawing functions to use SVG<br /> if (ffv >= 1.5) {<br /> Msn.Drawing.Graphic.CreateGraphic=function(f,b) { return new Msn.Drawing.SVGGraphic(f,b) }<br /> }<br /> <br /> <br /> <br /> var map = null;<br /> var pinID = 1;<br /> <br /> function GetMap(){<br /> map = new VEMap('myMap');<br /> map.LoadMap(new VELatLong(<?= $lat;?>, <?= $lon;?>), 12 ,'r' ,false);<br /> }<br /> function FindLoc(Loc){<br /> map.FindLocation(Loc);<br /> }<br /> function GetInfo(){<br /> alert('The top edge of the map on the Web page is at pixel: '+map.GetTop());<br /> alert('The left edge of the map on the Web page is at pixel: '+map.GetLeft());<br /> alert('The latitude,longitude at the center of the map is: '+map.GetCenter());<br /> alert('The current zoom level of the map is: '+map.GetZoomLevel());<br /> alert('The map control version is: '+VEMap.GetVersion());<br /> }<br /> function AddPin(){<br /> var pin = new VEPushpin(<br /> pinID,<br /> map.GetCenter(),<br /> 'images/anchor_sm.gif', <br /> '<? echo (isset($_GET['name']) && $_GET['name']!="")?$_GET['name']:"";?>',<br /> '<? echo (isset($_GET['address1']) && $_GET['address1']!="")?$_GET['address1']."<br /> ":"";?><? echo (isset($_GET['address2']) && $_GET['address2']!="")?$_GET['address2']."<br /> ":"";?><? echo (isset($_GET['town']) && $_GET['town']!="")?$_GET['town']."<br /> ":"";?><? echo (isset($_GET['county']) && $_GET['county']!="")?$_GET['county']."<br /> ":"";?><? echo (isset($_GET['postcode']) && $_GET['postcode']!="")?$_GET['postcode']."<br /> ":"";?>'<br /> );<br /> map.AddPushpin(pin);<br /> pinID++; <br /> } <br />
_Bat_ Posted March 2, 2007 Author Posted March 2, 2007 The code was in the right place, I got it to work after a -hard- refresh. Thanks so much for your help.
plugged_in Posted March 2, 2007 Posted March 2, 2007 No worries mate. I may call on you for help one day. I have PM'd you my private msn address.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now