0

Hi,

I am very much a js novice, and trying to follow a tutorial that plots markers on top of Ordnance Survey map. The code used works in part by loading the map, but the markers it loads from a locations_complete.xml file do not show, and no error message is generated.
The code and the xml file are in the same folder.
The bit that is working can be seen here:http://www.swaag.org/Workshop_OS/exercise_5_complete.html

The code knows the file name from line 62, and is loaded in line 153.
Any thoughts what is wrong? Thanks. The code and a small sample of the xml file data is shown below:

<html>
<head>
<!--the title to appear across the top of the webpage-->
<title>OS OpenSpace Tutorial</title>
<!--the code which tells the browser to pull in the OS OpenSpace JavaScripyt API-->
<script type= "text/javascript"src="http://openspace.ordnancesurvey.co.uk/osmapapi/openspace.js?key=B7A899F4BDF8CDD1E0405F0ACA6050EF&v=0.8.0"></script>
</head>
<!--the javascript section-->
<script type="text/javascript">

 		//this function tells the different browsers how to parse an xml file and handle the xmlDoc variable
    function parseXML()
    {
    try //Internet Explorer
      {
      xmlDoc=new ActiveXObject("Microsoft.XMLDOM");
      }
    catch(e)
      {
      try //Firefox, Mozilla, Opera, etc.
        {
        xmlDoc=document.implementation.createDocument("","",null);
        }
      catch(e)
        {
        alert(e.message);
        return;
        }
      }
    }
		//this defines a new variable called osMap
    var osMap;
    //this defines a variable osmarkers array used later
    var osmarkers = [];
    //this variable which is used as a counter used in the osmarkers variable and setting it to 0
    var i = 0;

		//this defines the init function
    function init()
    {
				/*the osMap variable creates a new map object and passes it to the "map" element id, 
				the div element whose size we have set in the html body*/
        osMap = new OpenSpace.Map('map');

        /* Add the map control, changing Large for Small changes the type of control visible to include or
         exclude the ladder in the zoom function*/
        osMap.addControl(new OpenSpace.Control.LargeMapControl());

				//this variable tells the browser to add in an overview map into the map window
        var control = new OpenSpace.Control.OverviewMap();
        osMap.addControl(control);
        control.maximizeControl();

				//setting the centre of the map and the zoom scale of the map when first opening, the lower the number the more zoomed out
        osMap.setCenter(new OpenSpace.MapPoint (442900, 314600), 2);

        //setting a variable "size" that will be used to determine the size of the info window when it opens
        var size = new OpenLayers.Size(300, 300);

				//defining the name of the xml file to read in
        xmlDoc.async=false;
        xmlDoc.load("locations_complete.xml");

				//defining a variable side_bar_html that is used to populate the side bar navigation with the list of images in it
	      var side_bar_html = "";

        // defining a variable isize that defines the size of the different icon being called into the map
        var isize = new OpenLayers.Size(33, 45);

				// defining a variable that sets the offset of the marker when it appears in the map window
        var offset = new OpenLayers.Pixel(-isize.w / 2, -isize.h / 2);

        /* tells the browser to read through the xml file and read each marker into a variable "x" and then asking
        it to go from number 1 to the end of the file*/
        var x=xmlDoc.getElementsByTagName("marker");
        for (i=0;i<x.length;i++)
        {
          /*the following list is the variables from the xml file that are being read in, each one has a variable name
          and in brackets the name of the field in the xml file that is being read in*/
          var pos = new OpenSpace.MapPoint(x[i].getElementsByTagName("lat")[0].childNodes[0].nodeValue, x[i].getElementsByTagName("lng")[0].childNodes[0].nodeValue);
          var names = x[i].getElementsByTagName("name")[0].childNodes[0].nodeValue;
          var county = x[i].getElementsByTagName("county")[0].childNodes[0].nodeValue;
          var date = x[i].getElementsByTagName("date")[0].childNodes[0].nodeValue;
          var links = x[i].getElementsByTagName("link")[0].childNodes[0].nodeValue;
          var label = x[i].getElementsByTagName("label")[0].childNodes[0].nodeValue;
          var image = x[i].getElementsByTagName("image")[0].childNodes[0].nodeValue;
          var photo = x[i].getElementsByTagName("copyright")[0].childNodes[0].nodeValue;
          var imagetype = x[i].getElementsByTagName("type")[0].childNodes[0].nodeValue;
          var icongif = x[i].getElementsByTagName("icongif")[0].childNodes[0].nodeValue;

					//the variable below is pulling in the icongif, isize and offset variables defined above to define the icons on the map
          var icon = new OpenSpace.Icon(icongif, isize, offset);
					
					/*this is the start of the if else statement that tells the browser which variant of the content and contents variables
					to use depending on the value of the image type variable.  The indexOf function parses the xml file looking for all
					entries that have the string image starting at any point greater than 0 (i.e. 1st, 2nd, 3rd character)*/
          if (imagetype.indexOf('image') > 0)
          {

					/*the variable below is the html string that defines the layout of the information in the info window pulling all 
					of the variables defined above to populate the fields defined here WHEN A MARKER IS CLICKED ON IN THE MAP WINDOW.
					For example the content below defines the text Name: in bold and then calls the "names" field to populate this from
					the xml file.  The two other contents variables below are for the cases of video and flash being called
					from clicking points on the map*/
          var content = "<font face='verdana' size='1'><b>Name: </b>" + names + "<br><b>County: </b>" + county + "<br><b>Date: </b>" + date + "<br><b>Photo: </b>" + photo + "<br><br><a href='" + links + "' target='_blank'>weblink</a><br><br><img src='" + image + "' width='200' height='150'></font>";

					/*the variable below is the html string that defines the content and layout of the information in the info window pulling all 
					of the variables defined above to populate the fields defined here WHEN A MARKER IS CLICKED ON FROM THE SIDE BAR MENU.
					For example the content below defines the text Name: in bold and then calls the "names" field to populate this from
					the xml file.  As this content is being called from JavaScript rather than from within the map window all the " symbols 
					have all been changed to &quot; so that when reading through the file the browser does not assume that the " symbol is the 
					end of the string when it is not. The two other contents variables below are for the cases of video and flash being called
					from the side bar menu*/
          var contents = "<font face=&quot;verdana&quot; size=&quot;1&quot;><b>Name: </b>" + names + "<br><b>County: </b>" + county + "<br><b>Date: </b>" + date + "<br><b>Photo: </b>" + photo + "<br><br><a href=&quot;" + links + "&quot; target=&quot;_blank&quot;>weblink</a><br><br><img src=&quot;" + image + "&quot; width=&quot;200&quot; height=&quot;150&quot;></font>";
          }
          else if (imagetype.indexOf('video') > 0)
          {
          var content = "<font face='verdana' size='1'><b>Name: </b>" + names + "<br><b>Video: </b>" + photo + "<br><a href='" + links + "' target='_blank'>weblink</a></font><br><br><OBJECT id='mediaPlayer' width='160' height='185' classid='CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95' codebase='http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701' standby='Loading Microsoft Windows Media Player components...' type='application/x-oleobject'><param name='" + image + "' value='" + image + "'><param name='animationatStart' value='true'><param name='transparentatStart' value='true'><param name='autoStart' value='true'><param name='showControls' value='true'><param name='loop' value='true'><EMBED type='application/x-mplayer2'  pluginspage='http://microsoft.com/windows/mediaplayer/en/download/' id='mediaPlayer' name='mediaPlayer' displaysize='4' autosize='-1' bgcolor='darkblue' showcontrols='true' showtracker='-1' showdisplay='0' showstatusbar='0' videoborder3d='-1' width='160' height='185' src='" + image + "' autostart='true' designtimesp='5311' loop='true'></EMBED></OBJECT>";
          var contents = "<font face=&quot;verdana&quot; size=&quot;1&quot;><b>Name: </b>" + names + "<br><b>Video: </b>" + photo + "<br><a href=&quot;" + links + "&quot; target=&quot;_blank&quot;>weblink</a></font><br><br><OBJECT id=&quot;mediaPlayer&quot; width=&quot;160&quot; height=&quot;185&quot; classid=&quot;CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95&quot; codebase=&quot;http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701&quot; standby=&quot;Loading Microsoft Windows Media Player components...&quot; type=&quot;application/x-oleobject&quot;><param name=&quot;" + image + "&quot; value=&quot;" + image + "&quot;><param name=&quot;animationatStart&quot; value=&quot;true&quot;><param name=&quot;transparentatStart&quot; value=&quot;true&quot;><param name=&quot;autoStart&quot; value=&quot;true&quot;><param name=&quot;showControls&quot; value=&quot;true&quot;><param name=&quot;loop&quot; value=&quot;true&quot;><EMBED type=&quot;application/x-mplayer2&quot;  pluginspage=&quot;http://microsoft.com/windows/mediaplayer/en/download/&quot; id=&quot;mediaPlayer&quot; name=&quot;mediaPlayer&quot; displaysize=&quot;4&quot; autosize=&quot;-1&quot; bgcolor=&quot;darkblue&quot; showcontrols=&quot;true&quot; showtracker=&quot;-1&quot; showdisplay=&quot;0&quot; showstatusbar=&quot;0&quot; videoborder3d=&quot;-1&quot; width=&quot;160&quot; height=&quot;185&quot; src=&quot;" + image + "&quot; autostart=&quot;true&quot; designtimesp=&quot;5311&quot; loop=&quot;true&quot;></EMBED></OBJECT>";
          }
          else
          {
          var content = "<font face='verdana' size='1'><b>Name: </b>" + names + "<br><b>Video: </b>" + photo + "<br><a href='" + links + "' target='_blank'>weblink</a></font><br><br><object width='200' height='162'><param name='movie' value='"+ image +"'></param><param name='allowFullScreen' value='true'></param><param name='allowscriptaccess' value='always'></param><embed src='"+ image +"' type='application/x-shockwave-flash' allowscriptaccess='always' allowfullscreen='true' width='200' height='162'></embed></object>";
          var contents = "<font face=&quot;verdana&quot; size=&quot;1&quot;><b>Name: </b>" + names + "<br><b>Video: </b>" + photo + "<br><a href=&quot;" + links + "&quot; target=&quot;_blank&quot;>weblink</a></font><br><br><object width=&quot;200&quot; height=&quot;162&quot;><param name=&quot;movie&quot; value=&quot;"+ image +"&quot;></param><param name=&quot;allowFullScreen&quot; value=&quot;true&quot;></param><param name=&quot;allowscriptaccess&quot; value=&quot;always&quot;></param><embed src=&quot;"+ image +"&quot; type=&quot;application/x-shockwave-flash&quot; allowscriptaccess=&quot;always&quot; allowfullscreen=&quot;true&quot; width=&quot;200&quot; height=&quot;162&quot;></embed></object>";

          }

					/*this variable is pulling in the variables defined above for position, icon, info window content and info window size
					to add them to the variable marker used below*/
          var marker = osMap.createMarker(pos, icon, content, size);

		/*this creates an array called osmarker and sets it to equal the marker set above*/
    osmarkers[i] = marker;

		/*this line is setting the function to list all of the "label" features in the side bar and then when they are clicked on
		to open an info window populated with the "contents" variable defined above.*/ 
    side_bar_html += '<a href="javascript:onclick=doOpenInfoWindow(osmarkers[' + i + '],\'' + contents + '\');">' + label + '</a><br>';

    }
		//this line is setting the HTML tag side_bar and setting the innerHTML to hold the information from the side_bar_html defined above
    document.getElementById("side_bar").innerHTML = side_bar_html;
   
	}
		//this function is for when the info window is being opened from the sidebar menu and defining the content of the window
    function doOpenInfoWindow(marker, content)
    {
        var size = new OpenLayers.Size(300,300);
        osMap.openInfoWindow(marker.icon, marker.lonlat, content, size);
    }
</script>

<!--in the body tag the onload function tells the browser to run the init and parseXML functions defined above in the JavaScript-->
<body bgcolor="#000000" text="#000000" onload="parseXML(); init();">
<table width="1000" border="0" cellspacing="0" cellpadding="0" align="center" bgcolor="#000000">
  <tr>
    <td width="800" height="800" align="left">
	<!--the map window div, the HTML element that will contain the map, here the width, height and any border is also set-->
	<div id="map" style="width: 800px; height: 800px; border: 1px solid white;"></div>
    </td>
	<!--the side bar navigation window, setting the width, height, scroll function, border etc...-->
    <td width = 190 valign="top" style="text-decoration: underline; color: #ff0000;">
       <div style="font-family:Verdana,Arial,Helvetica,sans-serif;font-size:11px;width:190px;height:800px;overflow-y:auto;overflow-x:auto;border:1px solid black;" id="side_bar"></div>
    </td>
   </tr> 
</table>



<p>&nbsp;</p>
</body>
</html>

Small part of the xml code below:

<markers>
-<marker> <lat> 216700 </lat> <lng> 771200 </lng> <name> Ben Nevis Flythrough </name> <county> Highland </county> <date> Dec-99 </date> <copyright> © Crown Copyright </copyright> <link> http://www.ordnancesurvey.co.uk/oswebsite/freefun/flythroughs.html </link> <image> images/bennevis.wmv </image> <label> Ben Nevis </label> <type> video </type> <icongif> markers/marker_black.png </icongif> </marker> -<marker> <lat> 438650 </lat> <lng> 114750 </lng> <name> OS Select advert </name> <county> Ordnance Survey </county> <date> Summer-06 </date> <copyright> © Crown Copyright </copyright> <link> www.ordnancesurvey.co.uk </link> <image> http://www.youtube.com/v/deZxw7Vr5Jk&hl=en&fs=1 </image> <label> OS Select </label> <type> flash </type> <icongif> markers/marker_black.png </icongif> </marker> </markers>

Many thanks for taking time to look at his for me. All the files are attached.

Stephen

Attachments
<html>
<head>
<!--the title to appear across the top of the webpage-->
<title>OS OpenSpace Tutorial</title>
<!--the code which tells the browser to pull in the OS OpenSpace JavaScripyt API-->
<script type= "text/javascript"src="http://openspace.ordnancesurvey.co.uk/osmapapi/openspace.js?key=B7A899F4BDF8CDD1E0405F0ACA6050EF&v=0.8.0"></script>
</head>
<!--the javascript section-->
<script type="text/javascript">

 		//this function tells the different browsers how to parse an xml file and handle the xmlDoc variable
    function parseXML()
    {
    try //Internet Explorer
      {
      xmlDoc=new ActiveXObject("Microsoft.XMLDOM");
      }
    catch(e)
      {
      try //Firefox, Mozilla, Opera, etc.
        {
        xmlDoc=document.implementation.createDocument("","",null);
        }
      catch(e)
        {
        alert(e.message);
        return;
        }
      }
    }
		//this defines a new variable called osMap
    var osMap;
    //this defines a variable osmarkers array used later
    var osmarkers = [];
    //this variable which is used as a counter used in the osmarkers variable and setting it to 0
    var i = 0;

		//this defines the init function
    function init()
    {
				/*the osMap variable creates a new map object and passes it to the "map" element id, 
				the div element whose size we have set in the html body*/
        osMap = new OpenSpace.Map('map');

        /* Add the map control, changing Large for Small changes the type of control visible to include or
         exclude the ladder in the zoom function*/
        osMap.addControl(new OpenSpace.Control.LargeMapControl());

				//this variable tells the browser to add in an overview map into the map window
        var control = new OpenSpace.Control.OverviewMap();
        osMap.addControl(control);
        control.maximizeControl();

				//setting the centre of the map and the zoom scale of the map when first opening, the lower the number the more zoomed out
        osMap.setCenter(new OpenSpace.MapPoint (442900, 314600), 2);

        //setting a variable "size" that will be used to determine the size of the info window when it opens
        var size = new OpenLayers.Size(300, 300);

				//defining the name of the xml file to read in
        xmlDoc.async=false;
        xmlDoc.load("locations_complete.xml");

				//defining a variable side_bar_html that is used to populate the side bar navigation with the list of images in it
	      var side_bar_html = "";

        // defining a variable isize that defines the size of the different icon being called into the map
        var isize = new OpenLayers.Size(33, 45);

				// defining a variable that sets the offset of the marker when it appears in the map window
        var offset = new OpenLayers.Pixel(-isize.w / 2, -isize.h / 2);

        /* tells the browser to read through the xml file and read each marker into a variable "x" and then asking
        it to go from number 1 to the end of the file*/
        var x=xmlDoc.getElementsByTagName("marker");
        for (i=0;i<x.length;i++)
        {
          /*the following list is the variables from the xml file that are being read in, each one has a variable name
          and in brackets the name of the field in the xml file that is being read in*/
          var pos = new OpenSpace.MapPoint(x[i].getElementsByTagName("lat")[0].childNodes[0].nodeValue, x[i].getElementsByTagName("lng")[0].childNodes[0].nodeValue);
          var names = x[i].getElementsByTagName("name")[0].childNodes[0].nodeValue;
          var county = x[i].getElementsByTagName("county")[0].childNodes[0].nodeValue;
          var date = x[i].getElementsByTagName("date")[0].childNodes[0].nodeValue;
          var links = x[i].getElementsByTagName("link")[0].childNodes[0].nodeValue;
          var label = x[i].getElementsByTagName("label")[0].childNodes[0].nodeValue;
          var image = x[i].getElementsByTagName("image")[0].childNodes[0].nodeValue;
          var photo = x[i].getElementsByTagName("copyright")[0].childNodes[0].nodeValue;
          var imagetype = x[i].getElementsByTagName("type")[0].childNodes[0].nodeValue;
          var icongif = x[i].getElementsByTagName("icongif")[0].childNodes[0].nodeValue;

					//the variable below is pulling in the icongif, isize and offset variables defined above to define the icons on the map
          var icon = new OpenSpace.Icon(icongif, isize, offset);
					
					/*this is the start of the if else statement that tells the browser which variant of the content and contents variables
					to use depending on the value of the image type variable.  The indexOf function parses the xml file looking for all
					entries that have the string image starting at any point greater than 0 (i.e. 1st, 2nd, 3rd character)*/
          if (imagetype.indexOf('image') > 0)
          {

					/*the variable below is the html string that defines the layout of the information in the info window pulling all 
					of the variables defined above to populate the fields defined here WHEN A MARKER IS CLICKED ON IN THE MAP WINDOW.
					For example the content below defines the text Name: in bold and then calls the "names" field to populate this from
					the xml file.  The two other contents variables below are for the cases of video and flash being called
					from clicking points on the map*/
          var content = "<font face='verdana' size='1'><b>Name: </b>" + names + "<br><b>County: </b>" + county + "<br><b>Date: </b>" + date + "<br><b>Photo: </b>" + photo + "<br><br><a href='" + links + "' target='_blank'>weblink</a><br><br><img src='" + image + "' width='200' height='150'></font>";

					/*the variable below is the html string that defines the content and layout of the information in the info window pulling all 
					of the variables defined above to populate the fields defined here WHEN A MARKER IS CLICKED ON FROM THE SIDE BAR MENU.
					For example the content below defines the text Name: in bold and then calls the "names" field to populate this from
					the xml file.  As this content is being called from JavaScript rather than from within the map window all the " symbols 
					have all been changed to &quot; so that when reading through the file the browser does not assume that the " symbol is the 
					end of the string when it is not. The two other contents variables below are for the cases of video and flash being called
					from the side bar menu*/
          var contents = "<font face=&quot;verdana&quot; size=&quot;1&quot;><b>Name: </b>" + names + "<br><b>County: </b>" + county + "<br><b>Date: </b>" + date + "<br><b>Photo: </b>" + photo + "<br><br><a href=&quot;" + links + "&quot; target=&quot;_blank&quot;>weblink</a><br><br><img src=&quot;" + image + "&quot; width=&quot;200&quot; height=&quot;150&quot;></font>";
          }
          else if (imagetype.indexOf('video') > 0)
          {
          var content = "<font face='verdana' size='1'><b>Name: </b>" + names + "<br><b>Video: </b>" + photo + "<br><a href='" + links + "' target='_blank'>weblink</a></font><br><br><OBJECT id='mediaPlayer' width='160' height='185' classid='CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95' codebase='http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701' standby='Loading Microsoft Windows Media Player components...' type='application/x-oleobject'><param name='" + image + "' value='" + image + "'><param name='animationatStart' value='true'><param name='transparentatStart' value='true'><param name='autoStart' value='true'><param name='showControls' value='true'><param name='loop' value='true'><EMBED type='application/x-mplayer2'  pluginspage='http://microsoft.com/windows/mediaplayer/en/download/' id='mediaPlayer' name='mediaPlayer' displaysize='4' autosize='-1' bgcolor='darkblue' showcontrols='true' showtracker='-1' showdisplay='0' showstatusbar='0' videoborder3d='-1' width='160' height='185' src='" + image + "' autostart='true' designtimesp='5311' loop='true'></EMBED></OBJECT>";
          var contents = "<font face=&quot;verdana&quot; size=&quot;1&quot;><b>Name: </b>" + names + "<br><b>Video: </b>" + photo + "<br><a href=&quot;" + links + "&quot; target=&quot;_blank&quot;>weblink</a></font><br><br><OBJECT id=&quot;mediaPlayer&quot; width=&quot;160&quot; height=&quot;185&quot; classid=&quot;CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95&quot; codebase=&quot;http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701&quot; standby=&quot;Loading Microsoft Windows Media Player components...&quot; type=&quot;application/x-oleobject&quot;><param name=&quot;" + image + "&quot; value=&quot;" + image + "&quot;><param name=&quot;animationatStart&quot; value=&quot;true&quot;><param name=&quot;transparentatStart&quot; value=&quot;true&quot;><param name=&quot;autoStart&quot; value=&quot;true&quot;><param name=&quot;showControls&quot; value=&quot;true&quot;><param name=&quot;loop&quot; value=&quot;true&quot;><EMBED type=&quot;application/x-mplayer2&quot;  pluginspage=&quot;http://microsoft.com/windows/mediaplayer/en/download/&quot; id=&quot;mediaPlayer&quot; name=&quot;mediaPlayer&quot; displaysize=&quot;4&quot; autosize=&quot;-1&quot; bgcolor=&quot;darkblue&quot; showcontrols=&quot;true&quot; showtracker=&quot;-1&quot; showdisplay=&quot;0&quot; showstatusbar=&quot;0&quot; videoborder3d=&quot;-1&quot; width=&quot;160&quot; height=&quot;185&quot; src=&quot;" + image + "&quot; autostart=&quot;true&quot; designtimesp=&quot;5311&quot; loop=&quot;true&quot;></EMBED></OBJECT>";
          }
          else
          {
          var content = "<font face='verdana' size='1'><b>Name: </b>" + names + "<br><b>Video: </b>" + photo + "<br><a href='" + links + "' target='_blank'>weblink</a></font><br><br><object width='200' height='162'><param name='movie' value='"+ image +"'></param><param name='allowFullScreen' value='true'></param><param name='allowscriptaccess' value='always'></param><embed src='"+ image +"' type='application/x-shockwave-flash' allowscriptaccess='always' allowfullscreen='true' width='200' height='162'></embed></object>";
          var contents =
<markers>																																		
<marker>	<lat>	434500	</lat>	<lng>	85500	</lng>	<name>	Freshwater Bay	</name>	<county>	Isle of Wight	</county>	<date>	Mar-00	</date>	<copyright>	&#169; Crown Copyright	</copyright>	<link>	www.ordnancesurvey.co.uk	</link>	<image>	images/March_2000.jpg	</image>	<label>	Mar-00	</label>	<type>	image	</type>	<icongif>	markers/marker_purple.png	</icongif>	</marker>
<marker>	<lat>	412250	</lat>	<lng>	142350	</lng>	<name>	Stonehenge	</name>	<county>	Wiltshire	</county>	<date>	Apr-00	</date>	<copyright>	&#169; Crown Copyright	</copyright>	<link>	http://www.stonehenge.co.uk/	</link>	<image>	images/April_2000.jpg	</image>	<label>	Apr-00	</label>	<type>	image	</type>	<icongif>	markers/marker_purple.png	</icongif>	</marker>
<marker>	<lat>	418500	</lat>	<lng>	635500	</lng>	<name>	Bamburgh Castle	</name>	<county>	Northumberland	</county>	<date>	May-00	</date>	<copyright>	&#169; Crown Copyright	</copyright>	<link>	http://www.bamburghcastle.com/	</link>	<image>	images/May_2000.jpg	</image>	<label>	May-00	</label>	<type>	image	</type>	<icongif>	markers/marker_purple.png	</icongif>	</marker>
<marker>	<lat>	524100	</lat>	<lng>	172200	</lng>	<name>	Wimbledon Tennis Centre	</name>	<county>	London	</county>	<date>	Jun-00	</date>	<copyright>	&#169; Crown Copyright	</copyright>	<link>	www.ordnancesurvey.co.uk	</link>	<image>	images/June_2000.jpg	</image>	<label>	Jun-00	</label>	<type>	image	</type>	<icongif>	markers/marker_purple.png	</icongif>	</marker>
<marker>	<lat>	567500	</lat>	<lng>	340500	</lng>	<name>	Hunstanton	</name>	<county>	Norfolk	</county>	<date>	Aug-00	</date>	<copyright>	&#169; Crown Copyright	</copyright>	<link>	www.ordnancesurvey.co.uk	</link>	<image>	images/August_2000.jpg	</image>	<label>	Aug-00	</label>	<type>	image	</type>	<icongif>	markers/marker_purple.png	</icongif>	</marker>
<marker>	<lat>	378500	</lat>	<lng>	569500	</lng>	<name>	Hadrians Wall	</name>	<county>	Northumberland	</county>	<date>	Sep-00	</date>	<copyright>	&#169; Crown Copyright	</copyright>	<link>	www.ordnancesurvey.co.uk	</link>	<image>	images/September_2000.jpg	</image>	<label>	Sep-00	</label>	<type>	image	</type>	<icongif>	markers/marker_purple.png	</icongif>	</marker>
<marker>	<lat>	235500	</lat>	<lng>	752500	</lng>	<name>	Rannoch Moor	</name>	<county>	Highland	</county>	<date>	Dec-00	</date>	<copyright>	&#169; Crown Copyright	</copyright>	<link>	www.ordnancesurvey.co.uk	</link>	<image>	images/December_2000.jpg	</image>	<label>	Dec-00	</label>	<type>	image	</type>	<icongif>	markers/marker_purple.png	</icongif>	</marker>
<marker>	<lat>	402500	</lat>	<lng>	498500	</lng>	<name>	Swaledale	</name>	<county>	North Yorkshire	</county>	<date>	Jun-01	</date>	<copyright>	&#169; Crown Copyright	</copyright>	<link>	www.ordnancesurvey.co.uk	</link>	<image>	images/June_2001.jpg	</image>	<label>	Jun-01	</label>	<type>	image	</type>	<icongif>	markers/marker_fuchsia.png	</icongif>	</marker>
<marker>	<lat>	311900	</lat>	<lng>	481070	</lng>	<name>	Silecroft	</name>	<county>	Cumbria	</county>	<date>	Jul-01	</date>	<copyright>	&#169; Crown Copyright	</copyright>	<link>	www.ordnancesurvey.co.uk	</link>	<image>	images/July_2001.jpg	</image>	<label>	Jul-01	</label>	<type>	image	</type>	<icongif>	markers/marker_fuchsia.png	</icongif>	</marker>
<marker>	<lat>	206500	</lat>	<lng>	730500	</lng>	<name>	Ben Cruachan	</name>	<county>	Argyll and Bute	</county>	<date>	Aug-01	</date>	<copyright>	&#169; Crown Copyright	</copyright>	<link>	www.ordnancesurvey.co.uk	</link>	<image>	images/August_2001.jpg	</image>	<label>	Aug-01	</label>	<type>	image	</type>	<icongif>	markers/marker_fuchsia.png	</icongif>	</marker>
<marker>	<lat>	329150	</lat>	<lng>	523650	</lng>	<name>	Castlerigg Stone Circle	</name>	<county>	Cumbria	</county>	<date>	Sep-01	</date>	<copyright>	&#169; Crown Copyright	</copyright>	<link>	http://www.visitcumbria.com/kes/casstone.htm	</link>	<image>	images/September_2001.jpg	</image>	<label>	Sep-01	</label>	<type>	image	</type>	<icongif>	markers/marker_fuchsia.png	</icongif>	</marker>
<marker>	<lat>	457500	</lat>	<lng>	511500	</lng>	<name>	Cliff Ridge	</name>	<county>	North Yorkshire	</county>	<date>	Oct-01	</date>	<copyright>	&#169; Crown Copyright	</copyright>	<link>	www.ordnancesurvey.co.uk	</link>	<image>	images/October_2001.jpg	</image>	<label>	Oct-01	</label>	<type>	image	</type>	<icongif>	markers/marker_fuchsia.png	</icongif>	</marker>
<marker>	<lat>	432500	</lat>	<lng>	357500	</lng>	<name>	Lea Wood	</name>	<county>	Derbyshire	</county>	<date>	Nov-01	</date>	<copyright>	&#169; Crown Copyright	</copyright>	<link>	www.ordnancesurvey.co.uk	</link>	<image>	images/November_2001.jpg	</image>	<label>	Nov-01	</label>	<type>	image	</type>	<icongif>	markers/marker_fuchsia.png	</icongif>	</marker>
<marker>	<lat>	425800	</lat>	<lng>	621800	</lng>	<name>	Dunstanburgh Castle	</name>	<county>	Northumberland	</county>	<date>	Feb-02	</date>	<copyright>	&#169; Crown Copyright	</copyright>	<link>	http://www.nationaltrust.org.uk/main/w-vh/w-visits/w-findaplace/w-dunstanburghcastle/	</link>	<image>	images/February_2002.jpg	</image>	<label>	Feb-02	</label>	<type>	image	</type>	<icongif>	markers/marker_red.png	</icongif>	</marker>
<marker>	<lat>	495500	</lat>	<lng>	504500	</lng>	<name>	Robin Hoods Bay	</name>	<county>	North Yorkshire	</county>	<date>	Mar-02	</date>	<copyright>	&#169; Crown Copyright	</copyright>	<link>	www.ordnancesurvey.co.uk	</link>	<image>	images/March_2002.jpg	</image>	<label>	Mar-02	</label>	<type>	image	</type>	<icongif>	markers/marker_red.png	</icongif>	</marker>
<marker>	<lat>	193500	</lat>	<lng>	78500	</lng>	<name>	Polzeath Beach	</name>	<county>	Cornwall	</county>	<date>	Apr-02	</date>	<copyright>	&#169; Crown Copyright	</copyright>	<link>	www.ordnancesurvey.co.uk	</link>	<image>	images/April_2002.jpg	</image>	<label>	Apr-02	</label>	<type>	image	</type>	<icongif>	markers/marker_red.png	</icongif>	</marker>
<marker>	<lat>	237500	</lat>	<lng>	753500	</lng>	<name>	Rannoch Moor	</name>	<county>	Highland	</county>	<date>	May-02	</date>	<copyright>	&#169; Crown Copyright	</copyright>	<link>	www.ordnancesurvey.co.uk	</link>	<image>	images/May_2002.jpg	</image>	<label>	May-02	</label>	<type>	image	</type>	<icongif>	markers/marker_red.png	</icongif>	</marker>
<marker>	<lat>	216400	</lat>	<lng>	756000	</lng>	<name>	Glencoe	</name>	<county>	Highland	</county>	<date>	Jul-02	</date>	<copyright>	&#169; Crown Copyright	</copyright>	<link>	www.ordnancesurvey.co.uk	</link>	<image>	images/July_2002.jpg	</image>	<label>	Jul-02	</label>	<type>	image	</type>	<icongif>	markers/marker_red.png	</icongif>	</marker>
<marker>	<lat>	220500	</lat>	<lng>	109500	</lng>	<name>	Sandy Mouth	</name>	<county>	Cornwall	</county>	<date>	Aug-02	</date>	<copyright>	&#169; Crown Copyright	</copyright>	<link>	www.ordnancesurvey.co.uk	</link>	<image>	images/August_2002.jpg	</image>	<label>	Aug-02	</label>	<type>	image	</type>	<icongif>	markers/marker_red.png	</icongif>	</marker>
<marker>	<lat>	216500	</lat>	<lng>	330500	</lng>	<name>	Porth Oer	</name>	<county>	Gwynedd	</county>	<date>	Sep-02	</date>	<copyright>	&#169; Crown Copyright	</copyright>	<link>	www.ordnancesurvey.co.uk	</link>	<image>	images/September_2002.jpg	</image>	<label>	Sep-02	</label>	<type>	image	</type>	<icongif>	markers/marker_red.png	</icongif>	</marker>
<marker>	<lat>	435500	</lat>	<lng>	572500	</lng>	<name>	St Marys Lighthouse	</name>	<county>	North Tyneside	</county>	<date>	Oct-02	</date>	<copyright>	&#169; Crown Copyright	</copyright>	<link>	www.ordnancesurvey.co.uk	</link>	<image>	images/October_2002.jpg	</image>	<label>	Oct-02	</label>	<type>	image	</type>	<icongif>	markers/marker_red.png	</icongif>	</marker>
<marker>	<lat>	316500	</lat>	<lng>	504800	</lng>	<name>	Illgill Head	</name>	<county>	Cumbria	</county>	<date>	Nov-02	</date>	<copyright>	&#169; Crown Copyright	</copyright>	<link>	www.ordnancesurvey.co.uk	</link>	<image>	images/November_2002.jpg	</image>	<label>	Nov-02	</label>	<type>	image	</type>	<icongif>	markers/marker_red.png	</icongif>	</marker>
<marker>	<lat>	458500	</lat>	<lng>	509500	</lng>	<name>	Easby Moor	</name>	<county>	North Yorkshire	</county>	<date>	Dec-02	</date>	<copyright>	&#169; Crown Copyright	</copyright>	<link>	www.ordnancesurvey.co.uk	</link>	<image>	images/December_2002.jpg	</image>	<label>	Dec-02	</label>	<type>	image	</type>	<icongif>	markers/marker_red.png	</icongif>	</marker>
<marker>	<lat>	260500	</lat>	<lng>	354500	</lng>	<name>	Snowdonia National Park	</name>	<county>	Wales	</county>	<date>	Jan-03	</date>	<copyright>	&#169; Crown Copyright	</copyright>	<link>	www.ordnancesurvey.co.uk	</link>	<image>	images/January_2003.jpg	</image>	<label>	Jan-03	</label>	<type>	image	</type>	<icongif>	markers/marker_orange.png	</icongif>	</marker>
<marker>	<lat>	603500	</lat>	<lng>	345500	</lng>	<name>	Blakeney	</name>	<county>	Norfolk	</county>	<date>	Feb-03	</date>	<copyright>	&#169; Crown Copyright	</copyright>	<link>	www.ordnancesurvey.co.uk	</link>	<image>	images/February_2003.jpg	</image>	<label>	Feb-03	</label>	<type>	image	</type>	<icongif>	markers/marker_orange.png	</icongif>	</marker>
<marker>	<lat>	388000	</lat>	<lng>	472000	</lng>	<name>	Darnbrook Fell	</name>	<county>	North Yorkshire	</county>	<date>	Apr-03	</date>	<copyright>	&#169; Crown Copyright	</copyright>	<link>	www.ordnancesurvey.co.uk	</link>	<image>	images/April_2003.jpg	</image>	<label>	Apr-03	</label>	<type>	image	</type>	<icongif>	markers/marker_orange.png	</icongif>	</marker>
<marker>	<lat>	380600	</lat>	<lng>	80200	</lng>	<name>	Durdle Door	</name>	<county>	Dorset	</county>	<date>	May-03	</date>	<copyright>	&#169; Crown Copyright	</copyright>	<link>	http://www.worldheritagecoast.net/place.aspx?place=25	</link>	<image>	images/May_2003.jpg	</image>	<label>	May-03	</label>	<type>	image	</type>	<icongif>	markers/marker_orange.png	</icongif>	</marker>
<marker>	<lat>	321500	</lat>	<lng>	507500	</lng>	<name>	Scafell Pike	</name>	<county>	Cumbria	</county>	<date>	Jun-03	</date>	<copyright>	&#169; Crown Copyright	</copyright>	<link>	www.ordnancesurvey.co.uk	</link>	<image>	images/June_2003.jpg	</image>	<label>	Jun-03	</label>	<type>	image	</type>	<icongif>	markers/marker_orange.png	</icongif>
2
Contributors
2
Replies
3
Views
5 Years
Discussion Span
Last Post by stephen_UK
1

Hi!

A few things you might consider:
>> First debug your code and find the source of your problem, then post the small piece of code that is flawed so that we do not have to spit through all your code (which I, for one, am not going to)
>> If you are a novice in JavaScript, you might consider starting with easier things instead of adapting difficult code.
>> If you did not write the script, we can not help you fix it. Seek help at the author of the script.

~G

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.