Jump to content

Recommended Posts

Posted
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 :D)
Posted
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").
Posted
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.
Posted

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

Posted

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.

Posted

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.

Posted

'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).

Posted

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.

Posted

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?

Posted

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

 

Posted

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)

Posted

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 />

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 account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...