Interesting.. I took out the if and else statement and the map works, well sort of.
The map shows up, as do the markers that are pulled in from the spreadsheet. The search doesn't work (the error console records the error on search). It doesn't post the message about the address is being found and a marker isn't placed. This is the error being found and it is of course related to the search. Error: showAddress is not defined Source File: http://hardins.com/retail4.htm/event/tkrfbxV3am2KP8w1e0L8Mg%3D%3D Line: 2 For some reason when the enter button is pressed, it now isn't finding this part of the code: // ====== Geocoding ====== function showAddress() { var search = document.getElementById("search").value; // ====== Perform the Geocoding ====== geo.getLocations(search, function (result) { I don't know why. I really need to limit the number of markers shown per page. The are only going to be concentrated in really one state and there is going to be more than 1000. On Oct 3, 9:20 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > On Oct 3, 6:03 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > > > I found that in the map that has the search function that I want to > > add,http://econym.org.uk/gmap/example_geo.htm, it only works if the > > script is in the body. The map breaks if the code is moved into the > > head. > > > I checkedhttp://www.hardins.com/retail.htmtosee if it would break > > if I moved the code into the body section, it works fine either way, > > albeit a bit slow because of so many markers (I still need to figure > > out how to limit how many markers are shown). > > >http://www.hardins.com/retail3.htm > > Do you know what "syntax error" means? > An option would be to usehttp://www.jslint.com > That says (ignore the line number as it will be different from your > source): > > Problem at line 87 character 9: Expected an identifier and instead saw > 'else'. > > } else { > > The javascript interpreter is not expecting an "else" there. You > probably should look at where you believe the matching "if" is... > > -- Larry > > > reflects the changes I made and > > moved all of the script of retail.htm + the search function from > > retail2.htm to the bottom of the body section instead of the head > > section. Everything is still broken, still can't figure out where the > > conflict is. > > >http://www.hardins.com/retail2.htmiswhere I am trying to change the > > icon that is shown. I'm not sure where I am failing there, it is > > still showing the default icon. > > > On Oct 2, 4:11 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> > > wrote: > > > > On Oct 2, 12:39 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > > > > > I actually use firefox and have firebug installed. > > > > > With firebug I get the errors: > > > > > syntax error > > > > > } else {\n > > > > > and.. > > > > > load is not defined > > > > onload(load ) > > > > load(); > > > > > Both of those are referring to code that was already in place in the > > > > working map. > > > > But there is now an error. Look at what you changed. If you still > > > can't find it try comparing the two files. > > > > -- Larry > > > > > The error console points to the same two pieces of code... > > > > > On Oct 2, 3:02 pm, Esa <[EMAIL PROTECTED]> wrote: > > > > > > You have the code example to follow. The biggest trouble seems to be > > > > > that your browser does not tell you about the errors in your script. > > > > > > Firefox error console tells you exactly what is wrong. With Firebug > > > > > extension installed it tells you even more. > > > > > > Do not even try to make web pages with IE as the test browser. Any > > > > > other browser gives you reliable information about your errors. Just > > > > > use IE now and then at milestones of your page development to see how > > > > > it misbehaves and does not tell what is wrong. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
