Google Maps help needed.

Reply

Join Date: May 2004
Posts: 102
Reputation: kained is an unknown quantity at this point 
Solved Threads: 0
kained kained is offline Offline
Junior Poster

Google Maps help needed.

 
0
  #1
May 3rd, 2008
I have deisgned a site. http://intweb.tech.bcuc.ac.uk/~20318...ject/home.html and am trying to get my google map sorted. http://intweb.tech.bcuc.ac.uk/~20318...ject/index.php.

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

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

Help!!!!
Reply With Quote Quick reply to this message  
Join Date: May 2004
Posts: 102
Reputation: kained is an unknown quantity at this point 
Solved Threads: 0
kained kained is offline Offline
Junior Poster

Re: Google Maps help needed.

 
0
  #2
May 3rd, 2008
  1. var centerLatitude = 51.523647; //longittude and latitude coordinates and zoom geocodes
  2. var centerLongitude = -0.146470;
  3. var startZoom = 14;
  4. var description = 'London';
  5.  
  6. function addMarker(latitude, longitude, description) {
  7. var marker = new GMarker(new GLatLng(latitude, longitude));
  8.  
  9. GEvent.addListener(marker, 'click',
  10. function() {
  11. marker.openInfoWindowHtml(description);
  12. }
  13. );
  14.  
  15. map.addOverlay(marker);
  16. }
  17.  
  18. function init() {
  19. if (GBrowserIsCompatible()) {
  20. map = new GMap2(document.getElementById("map"));
  21. map.addControl(new GSmallMapControl());
  22. map.setCenter(new GLatLng(centerLatitude, centerLongitude), startZoom);
  23.  
  24. for(id in markers) {
  25. addMarker(markers[id].latitude, markers[id].longitude, markers[id].name, markers[id].pcode);
  26. }
  27. }
  28. }
  29.  
  30. window.onload = init;
  31. window.onunload = GUnload;

for the java script.

  1. var markers = [
  2. {
  3. 'latitude': 51.51383,
  4. 'longitude': -00.15246,
  5. 'name': 'Balderton street',
  6. 'pcode': 'W1'
  7. },
  8. {
  9. 'latitude': 51.51504,
  10. 'longitude': -00.15039,
  11. 'name': 'Barrett Street',
  12. 'pcode': 'W1'
  13. },
  14. {
  15. 'latitude': 51.51015,
  16. 'longitude': -0.18692,
  17. 'name': 'Bayswater Road',
  18. 'pcode': 'W2'
  19. },
  20. {
  21. 'latitude': 51.52113,
  22. 'longitude': -00.20921,
  23. 'name': 'Bevington Road',
  24. 'pcode': 'W10'
  25. },
  26.  
  27.  
  28. {
  29. 'latitude': 51.51626,
  30. 'longitude': -00.18732,
  31. 'name': 'Bishops Bridge Road',
  32. 'pcode': 'W2'
  33. },
  34. {
  35. 'latitude': 51.49681,
  36. 'longitude': -00.14168,
  37. 'name': 'Bressenden Place',
  38. 'pcode': 'SW1'
  39. },
  40.  
  41. {
  42. 'latitude': 51.51360,
  43. 'longitude': -00.13581,
  44. 'name': 'Broadwick Street',
  45. 'pcode': 'W1'
  46. },
  47. {
  48. 'latitude': 51.50966,
  49. 'longitude': -0.08036,
  50. 'name': 'Byward Street',
  51. 'pcode': 'EC3'
  52. },
  53. {
  54. 'latitude': 51.53890,
  55. 'longitude': -00.14287,
  56. 'name': 'Camden High Street 176',
  57. 'pcode': 'NW1'
  58. },
  59. {
  60. 'latitude': 51.46475,
  61. 'longitude': -00.16845,
  62. 'name': 'Clapham Junction/Station Approach',
  63. 'pcode': 'SW11'
  64. },
  65. {
  66. 'latitude': 51.51006,
  67. 'longitude': -0.28809,
  68. 'name': 'Ealing Common, Uxbridge Road ',
  69. 'pcode': 'W1'
  70. },
  71. {
  72. 'latitude': 51.49471,
  73. 'longitude': -0.18280,
  74. 'name': 'Gloucester Road',
  75. 'pcode': 'SW7
  76. },
  77. {
  78. 'latitude': 51.51411,
  79. 'longitude': -00.13951,
  80. 'name': 'Great Marlborough Street',
  81. 'pcode': 'W1'
  82. },
  83. {
  84. 'latitude': 51.50651,
  85. 'longitude': -00.14291,
  86. 'name': 'Green Park underground station',
  87. 'pcode': 'W1'
  88. },
  89. {
  90. 'latitude': 51.52438,
  91. 'longitude': -00.20144,
  92. 'name': 'Harrow Road',
  93. 'pcode': 'W9'
  94. },
  95. {
  96. 'latitude': 51.51706,
  97. 'longitude': -00.11876,
  98. 'name': 'High Holborn',
  99. 'pcode': 'WC1'
  100. },
  101. {
  102. 'latitude': 51.50152,
  103. 'longitude': -00.20335,
  104. 'name': 'Holland Park',
  105. 'pcode': 'W8'
  106. },
  107. {
  108. 'latitude': 51.50305,
  109. 'longitude': -00.15333,
  110. 'name': 'Hyde Park Corner',
  111. 'pcode': 'SW1'
  112. },
  113. {
  114. 'latitude': 51.51171,
  115. 'longitude': -00.12164,
  116. 'name': 'London Transport Museum',
  117. 'pcode': 'WC1'
  118. },
  119. {
  120. 'latitude': 51.51610,
  121. 'longitude': - 0.18855,
  122. 'name': 'Westbourne Grove',
  123. 'pcode': 'W2'
  124. },
  125. {
  126. 'latitude': 51.50358,
  127. 'longitude': - 0.19181,
  128. 'name': 'kensington Church Street Bus Shelter Autoloo', 'pcode': 'W8'
  129. },
  130.  
  131.  
  132. {
  133. 'latitude': 51.49866,
  134. 'longitude': -00.19939,
  135. 'name': 'Kensington High Street',
  136. 'pcode': 'W8'
  137. },
  138. {
  139. 'latitude': 51.50136,
  140. 'longitude': -00.19412,
  141. 'name': 'Kensington Town Hall',
  142. 'pcode': 'W8'
  143. },
  144. {
  145. 'latitude': 51.51057,
  146. 'longitude': -00.13061,
  147. 'name': 'Leicester Square',
  148. 'pcode': 'W1'
  149. },
  150. {
  151. 'latitude': 51.51057,
  152. 'longitude': -00.08652,
  153. 'name': 'London Bridge Station',
  154. 'pcode': 'SE1'
  155. },
  156. {
  157. 'latitude': 51.51274,
  158. 'longitude': -00.16078,
  159. 'name': 'Marble Arch',
  160. 'pcode': 'W1'
  161. },
  162. {
  163. 'latitude': 51.51137,
  164. 'longitude': -00.17571,
  165. 'name': 'Kensington Gardens',
  166. 'pcode': 'W2'
  167. },
  168.  
  169. {
  170. 'latitude': 51.52233,
  171. 'longitude': -00.15571,
  172. 'name': 'Marylebone Road',
  173. 'pcode': 'NW1'
  174. },
  175. {
  176. 'latitude': 51.50731,
  177. 'longitude': -00.14342,
  178. 'name': 'Mayfair Place',
  179. 'pcode': 'W1'
  180. },
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187. ];
  188.  

Both apparently have correct syntex. I'm confused.
Reply With Quote Quick reply to this message  
Join Date: May 2008
Posts: 1
Reputation: clh22793 is an unknown quantity at this point 
Solved Threads: 0
clh22793 clh22793 is offline Offline
Newbie Poster

Re: Google Maps help needed.

 
0
  #3
May 28th, 2008
I found a few of these helpful as well:

http://www.newwebplatform.com/tips-a...ls/Google-Maps
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the PHP Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC