| | |
Google Maps help needed.
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: May 2004
Posts: 102
Reputation:
Solved Threads: 0
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!!!!
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!!!!
•
•
Join Date: May 2004
Posts: 102
Reputation:
Solved Threads: 0
PHP Syntax (Toggle Plain Text)
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.
PHP Syntax (Toggle Plain Text)
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.
![]() |
Similar Threads
- Google maps php/js help needed. (PHP)
- System Alert thing please help me (Viruses, Spyware and other Nasties)
- City Portal Website (PHP)
- Thanks for the Help With Search Redirections (Viruses, Spyware and other Nasties)
- HiJack This Log -Spyware and Viruse- HELP (Viruses, Spyware and other Nasties)
- Aurora Pop-Up Help needed (Viruses, Spyware and other Nasties)
- New user with Bridge.DLL error (Viruses, Spyware and other Nasties)
Other Threads in the PHP Forum
- Previous Thread: SQL query and HTML Tables
- Next Thread: how to cover while loop in php template
| Thread Tools | Search this Thread |
# 5.2.10 alexa apache api array beginner binary broken cakephp checkbox class clean clients cms code cron curl database date directory display dissertation dropdown dynamic echo echo$_get[x]changingitintovariable... email encode error fairness file files folder form forms function functions google href htaccess html image images include indentedsubcategory insert ip javascript joomla legislation limit link local login mail memberships menu mlm multiple multipletables mysql mysqlquery newsletters oop open paypal pdf persist php problem provider query radio random recursion remote rss script search server sessions sms sockets source space spam sql syntax system table tutorial update upload url validator variable video web youtube





