Hi Chris and Andrew Thanks very much for your help. I shall pass your responses onto my developer ASAP.
Reza On Nov 5, 5:56 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > check out this > thread:http://groups.google.com/group/Google-Maps-API/browse_thread/thread/e... > > It will probably help you out. > > On Nov 5, 12:47 pm, Reza <[EMAIL PROTECTED]> wrote: > > > Hi there > > > Would appreciated some help with our client's websitewww.gibsonsgames.co.uk. > > We have a store locator which references about 1500 stores - a lot I > > know, and not the most efficient way of using Google Maps API, but we > > were not aware of sheer number of stores during construction. This was > > working fine for about 4 months until about 2 weeks ago. > > > Problem: Where to Buy section (officially offline but our test page > > demonstrates problem -http://www.gibsonsgames.co.uk/store-locator-test.php) > > not loading up any stores onto Google Maps. Page should load up the > > stores, and then allow user to enter postcode and zero in on closest > > stores. No store locations load up at all. > > > Tests conducted on Internet Explorer V7 and Firefox 3: > > 1. Checked database for any erroneous data that could be tripping up > > Google Maps. > > 2. Ran query with only 10 postcodes in script, still not working. > > > Questions: > > 1. Has Google introduced limits on usage. Our big query of about 1500 > > stores each time someone clicks on the Where to Buy page may have been > > restricted by Google Maps API? We don't think so, but is this > > possible. The test of just 10 stores doesn't work either. > > 2. Have Google Maps made changes to the way Google executes its > > functions, or has the script syntax changed? Script snippet example > > for 10 store query to Google Maps API is below. > > > Your help would be much appreciated. > > Reza > > SAMMAKKO DESIGN > > > Script snippet for Google Maps API from test > > pagehttp://www.gibsonsgames.co.uk/store-locator-test.php://<![CDATA[ > > // Google Map Maker script v.1.1 > > // (c) 2006 Richard Stephensonhttp://www.donkeymagic.co.uk > > // Email: [EMAIL PROTECTED] > > //http://mapmaker.donkeymagic.co.uk > > var map; > > var icon0; > > var newpoints = new Array(); > > var markers = new Array(); > > > function addLoadEvent(func) { > > var oldonload = window.onload; > > if (typeof window.onload != 'function'){ > > window.onload = func > > } else { > > window.onload = function() { > > oldonload(); > > func(); > > } > > } > > } > > > addLoadEvent(loadMap); > > addLoadEvent(addPoints); > > > function loadMap() { > > map = new GMap2(document.getElementById("map")); > > map.addControl(new GLargeMapControl()); > > map.addControl(new GMapTypeControl()); > > map.setCenter(new GLatLng( 51.49891200625806, > > -0.11260986328125), > > 11); > > map.setMapType(G_MAP_TYPE); > > > icon0 = new GIcon(); > > icon0.image = > > "http://www.sammakkodesign.co.uk/gibsonsweb/images/ > > mapicon.png"; > > icon0.shadow = > > "http://www.google.com/mapfiles/shadow50.png"; > > icon0.iconSize = new GSize(23, 36); > > icon0.shadowSize = new GSize(37, 34); > > icon0.iconAnchor = new GPoint(9, 34); > > icon0.infoWindowAnchor = new GPoint(9, 2); > > icon0.infoShadowAnchor = new GPoint(18, 25); > > } > > > function addPoints() { > > > newpoints[0] = new Array(52.340267, -1.577007, icon0, 'ABACRAFT ART > > & > > PICTURES', '<p style="color:#016BB7; padding:0px; margin: > > 0px;"><h1>ABACRAFT ART & PICTURES</h1>70 WARWICK ROAD<br /> > > KENILWORTH<br /> WARWICKS <br />CV8 1HH<br /><strong>01926 511294</ > > strong><p>'); > > newpoints[1] = new Array(51.313703, 0.891427, icon0, 'ABACUS TOYS', > > '<p style="color:#016BB7; padding:0px; margin:0px;"><h1>ABACUS TOYS</ > > h1>19A PRESTON STREET<br /> FAVERSHAM<br /> KENT<br />ME13 8NZ<br > > /><strong>01795 591203</strong><p>'); > > > newpoints[2] = new Array(51.998718, -0.987751, icon0, 'ABACUS TOYS', > > '<p style="color:#016BB7; padding:0px; margin:0px;"><h1>ABACUS TOYS</ > > h1>1 WELL STREET<br /> BUCKINGHAM<br /> BUCKS<br />MK18 1EW<br > > /><strong>01280 821815</strong><p>'); > > > newpoints[3] = new Array(52.036526, -1.1505, icon0, 'CUT YOUR OWN > > THROAT GAMES', '<p style="color:#016BB7; padding:0px; margin: > > 0px;"><h1>CUT YOUR OWN THROAT GAMES</h1>22 DUMAS CUL DE SAC<br /> > > BRACKLEY<br /> NORTHANTS<br />NN13 6LL<br /><strong>01280 821815</ > > strong><p>'); > > newpoints[4] = new Array(52.08886, -0.752001, icon0, 'ACE GAMES & > > PUZZLES', '<p style="color:#016BB7; padding:0px; margin:0px;"><h1>ACE > > GAMES & PUZZLES</h1>37 NEWBOLT CLOSE<br /> NEWPORT PAGNELL<br /> > > BUCKS<br />MK16 8ND<br /><strong>01908 611894</strong><p>'); > > newpoints[5] = new Array(50.724629, -2.935449, icon0, 'ACORN', '<p > > style="color:#016BB7; padding:0px; margin:0px;"><h1>ACORN</h1>26 BROAD > > STREET<br /> LYME REGIS<br /> DORSET<br />DT7 3QE<br /><strong>01297 > > 442251</strong><p>'); > > newpoints[6] = new Array(50.780805, -3.003039, icon0, 'ACORN', '<p > > style="color:#016BB7; padding:0px; margin:0px;"><h1>ACORN</h1>VICTORIA > > PLACE<br /> AXMINSTER<br /> DEVON<br />EX13 5NG<br /><strong>01297 > > 442251</strong><p>'); > > newpoints[7] = new Array(50.467592, -3.537988, icon0, 'ACTION MODEL > > CENTRE', '<p style="color:#016BB7; padding:0px; margin: > > 0px;"><h1>ACTION MODEL CENTRE</h1>34 LUCIUS STREET<br /> TORQUAY<br /> > > DEVON<br />TQ2 5UN<br /><strong>01803 292029</strong><p>'); > > newpoints[8] = new Array(56.471984, -3.017205, icon0, 'ACTIVE > > LEARNING', '<p style="color:#016BB7; padding:0px; margin: > > 0px;"><h1>ACTIVE LEARNING</h1>RESOURCES LTD<br /> 127 SOUTH ROAD<br /> > > DUNDEE<br />DD2 3EP<br /><strong>08707 572836</strong><p>'); > > newpoints[9] = new Array(50.968422, 0.699634, icon0, 'ADAMS OF RYE', > > '<p style="color:#016BB7; padding:0px; margin:0px;"><h1>ADAMS OF RYE</ > > h1>8 HIGH STREET<br /> RYE<br /> EAST SUSSEX<br />TN31 7JB<br / > > > ><strong>01797 223136</strong><p>'); > > > for(var i = 0; i < newpoints.length; i++) { > > var point = new > > GPoint(newpoints[i][1],newpoints[i][0]); > > var popuphtml = newpoints[i][4] ; > > var marker = > > createMarker(point,newpoints[i][2],popuphtml); > > markers.push(marker); > > map.addOverlay(marker); > > } > > } > > > function createMarker(point, icon, popuphtml) { > > var popuphtml = "<div id=\"popup\">" + popuphtml + > > "<\/div>"; > > var marker = new GMarker(point, icon); > > GEvent.addListener(marker, "click", function() { > > marker.openInfoWindowHtml(popuphtml); > > }); > > return marker; > > } > > function closestMarkerSearch(map, markers, zoom, address) { > > if (markers.length == 0) { > > throw new Exception('No markers given'); > > } > > new GClientGeocoder().getLatLng(address, > > function(latLng) { > > if (latLng === null) { > > alert('Please enter a postcode. Use > > proper spacing for > > postcodes'); > > } else { > > var distance; > > var closestDistance = null; > > var closestMarker = null; > > for (var i = 0; i < markers.length; > > i++) { > > distance = > > latLng.distanceFrom(markers[i].getLatLng()); > > if (closestDistance === > > null || distance < closestDistance) { > > closestDistance = > > distance; > > closestMarker = > > markers[i]; > > } > > } > > > > ... > > read more » --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Maps API" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/Google-Maps-API?hl=en -~----------~----~----~----~------~----~------~--~---
