I have deisgned a site. http://intweb.tech.bcuc.ac.uk/~20318219/project/home.html and am trying to get my google map sorted. http://intweb.tech.bcuc.ac.uk/~20318219/project/index.php.

All the markers have disserpeared after i played about with my java script functions file http://intweb.tech.bcuc.ac.uk/~20318219/project/map_functions.js and the php database http://intweb.tech.bcuc.ac.uk/~20318219/project/map_data.php.

Im sure its something really simple like i have left pout a comma somewhere but i can't find it.

Help!!!!

var centerLatitude = 51.523647;  //longittude and latitude coordinates and zoom geocodes
var centerLongitude = -0.146470;
var startZoom = 14;
var description = 'London';
 
function addMarker(latitude, longitude, description) {
var marker = new GMarker(new GLatLng(latitude, longitude));
 
GEvent.addListener(marker, 'click',
function() {
marker.openInfoWindowHtml(description);
}
);
 
map.addOverlay(marker);
}
 
function init() {
if (GBrowserIsCompatible()) {
map = new GMap2(document.getElementById("map"));
map.addControl(new GSmallMapControl());
map.setCenter(new GLatLng(centerLatitude, centerLongitude), startZoom);
 
for(id in markers) {
addMarker(markers[id].latitude, markers[id].longitude, markers[id].name, markers[id].pcode);
}
}
}
 
window.onload = init;
window.onunload = GUnload;

for the java script.

var markers = [
	{
	'latitude': 51.51383,
	'longitude': -00.15246,
	'name': 'Balderton street',
	'pcode': 'W1'
	},
		{
		'latitude':  51.51504,
		'longitude': -00.15039,
		'name': 'Barrett Street',
		'pcode': 'W1'
		},
			{
			'latitude':  51.51015,
			'longitude': -0.18692,
			'name': 'Bayswater Road',
			'pcode': 'W2'
			},
				{
				'latitude':  51.52113,
				'longitude': -00.20921,
				'name': 'Bevington Road',
				'pcode': 'W10'
				},


					{
					'latitude':  51.51626,
					'longitude': -00.18732,
					'name': 'Bishops Bridge Road',
					'pcode': 'W2'
					},
							{
							'latitude':  51.49681,
							'longitude': -00.14168,
							'name': 'Bressenden Place',
							'pcode': 'SW1'
							},

								{
								'latitude':  51.51360,
								'longitude': -00.13581,
								'name': 'Broadwick Street',
								'pcode': 'W1'
								},
									{
									'latitude':  51.50966,
									'longitude': -0.08036,
									'name': 'Byward Street',
									'pcode': 'EC3'
									},
										{
										'latitude':  51.53890,
										'longitude': -00.14287,
										'name': 'Camden High Street 176',
										'pcode': 'NW1' 
										},
											{
											'latitude':   51.46475,
											'longitude': -00.16845,
											'name': 'Clapham Junction/Station Approach',
											'pcode': 'SW11' 
											},
											{	
											'latitude':   51.51006,
											'longitude': -0.28809,
											'name': 'Ealing Common, Uxbridge Road ', 
											'pcode': 'W1'
											},
												{	
												'latitude':   51.49471,
												'longitude': -0.18280,
												'name': 'Gloucester Road',
												'pcode': 'SW7 
												},
													{	
													'latitude':   51.51411,
													'longitude': -00.13951,
													'name': 'Great Marlborough Street', 
													'pcode': 'W1'
													},
														{	
														'latitude':   51.50651,
														'longitude': -00.14291,
														'name': 'Green Park underground station', 
														'pcode': 'W1'
														},
														 	{	
															'latitude':   51.52438,
															'longitude':  -00.20144,
															'name': 'Harrow Road', 
															'pcode': 'W9'
															},
																{	
																'latitude':   51.51706,
																'longitude':  -00.11876,
																'name': 'High Holborn', 
																'pcode': 'WC1'
																},
																	{	
																	'latitude':   51.50152,
																	'longitude':  -00.20335,
																	'name': 'Holland Park', 
																	'pcode': 'W8'
																	},
																		{	
																		'latitude':   51.50305,
																		'longitude':  -00.15333,
																		'name': 'Hyde Park Corner', 
																		'pcode': 'SW1'
																		},
																			{
																			'latitude':   51.51171,
																			'longitude':  -00.12164,
																			'name': 'London Transport Museum',
																			'pcode': 'WC1' 
																			},
																				{
																				'latitude':   51.51610,
																				'longitude':  - 0.18855,
																				'name': 'Westbourne Grove', 
																				'pcode': 'W2'
																				},
																					{
																					'latitude':   51.50358,
																					'longitude':    - 0.19181,
																					'name': 'kensington Church Street Bus Shelter Autoloo', 																					'pcode': 'W8'
																					},
																					
																						
																							{																						
																							'latitude':   51.49866,
																							'longitude':     -00.19939,
																							'name': 'Kensington High Street', 
																							'pcode': 'W8'
																							},
																								{																						
																								'latitude':   51.50136,
																								'longitude':     -00.19412,
																								'name': 'Kensington Town Hall',
																								'pcode': 'W8' 
																								},
																									{																						
																									'latitude':    51.51057,
																									'longitude':     -00.13061,
																									'name': 'Leicester Square', 
																									'pcode': 'W1'
																									},
																										{																						
																										'latitude':    51.51057,
																										'longitude':     -00.08652,																														
																										'name': 'London Bridge Station', 
																										'pcode': 'SE1'
																										},
																											{																						
																											'latitude':    51.51274,
																											'longitude':     -00.16078,																														
																											'name': 'Marble Arch', 
																											'pcode': 'W1'
																											},
																												{																						
																												'latitude':    51.51137,
																												'longitude':     -00.17571,
																												'name': 'Kensington Gardens',
																												'pcode': 'W2'																																																													
																												},
																																																								
																													{																						
																													'latitude':    51.52233,
																													'longitude':    -00.15571,
																													'name': 'Marylebone Road',
																													'pcode': 'NW1'																																																													
																													},
																														{																						
																														'latitude':    51.50731,
																														'longitude':    -00.14342,
																														'name': 'Mayfair Place',	
																														'pcode': 'W1'																																																												
																														},






];

Both apparently have correct syntex. I'm confused.

This article has been dead for over six months. Start a new discussion instead.