> http://www.my-walk.com/addwalk.php
Map not working for me. Do you think these lines var initialLocation = university; var university = new google.maps.LatLng(52.94, -1.195); might work better the other way round? > The tester part is just to see that I can get them through the pages, > ideally I want to pass it through 3 or 4 pages and then submit it to a MySQL > database. > > Hope that helps, Doesn't help me , but then I'm not the one with the problem. Does it help you to solve it? Here's an example of reading data from a MySQL database via php and showing on a map http://code.google.com/apis/maps/articles/phpsqlajax_v3.html Here's an exmple of passing info to a MySQL database via php http://code.google.com/apis/maps/articles/phpsqlinfo_v3.html You can use the techniques there to push your data around from a webpage to php and back to another webpage, without actually going into MySQL in the interim. You don't have to use XML if you don't want, it's only a means of shuffling string data around. I think the bit you need to grasp is that you cannot just push a javascript object from one webpage to another. You need a means to transfer the details about the markers that you are really interested in - marker position and colour, say - and have your second webpage make its own objects based on that data. You might do _something_ like for (i = 0; (i < markersArray.length); i++) { ... // where markersArray[i] is an API marker object somedata += markersArray[i].getPosition().toString() + "," ; ... } to build up your collection of marker data before POSTing it to php. You could in fact assemble your data as an array of marker details if you wanted, that might make it easier to handle at the php end. It's up to you to design the data interchange as you want it, but we might imagine something like [ 22.57, 71.0 , 'blue' , 'Descriptive text' ] , [ 30.6 , 69.5 , 'red' , 'More description' ] > Also, I remember the reason I tried this method is that I tried your > foreach(..... Who "you"? I don't think you should use for-each at all, it often produces unexpected results when used in an object-oriented environment. None of this is maps specific at all, it's about how to transfer javascript values to php and vice-versa. By the by, I looked into duplicate 'name' attributes in HTML tags, <form name ="markersArray" .... <input type="hidden" name="markersArray" ... and it seems that is likely to confuse some scripts e.g. document.getElementById('markersArray') is going to return an indeterminate element in IE browser. I think it falls under "not forbidden but unwise". -- You received this message because you are subscribed to the Google Groups "Google Maps JavaScript API v3" 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-js-api-v3?hl=en.
