Hi Your last paragraph makes a lot of sense but that is the whole point, the marker somehow needs to know what polygon it is in in the first place. That is the part I do not get. Perhaps you are assuming I already knew how to determine this, which I do not. The polygon data is geocoded. I do not want the user to have to manually type in what polygon they think their marker is in when they add a marker (adding a marker is on a seperate map). If I did not care about them having to make this determination on their own then of course I would just reference the db.
Thanks Phil On Jun 3, 10:34 am, Andrew Leach <[email protected]> wrote: > On Jun 3, 6:22 pm, hypermod <[email protected]> wrote: > > > Hi Andrew > > > Thank you for your response, but I am not sure if I made myself clear. > > Your response seemed to be answering a question that I did not mean to > > ask. > > Possibly, but I think my answer does fit what you say below. > > > All the polygons are known. All the marker locations are known. This > > information is kept in a MySQL db. The only thing I would need on the > > client side is the ability to know the answer to this question: > > > What markers are in such-and-such polygon (using a drop down list of > > the named polygons)? > > So you have a polygon. What is known about it? Its boundary? > > > Even though the user can see clearly which markers are in the polygon, > > they want the ability to print out a list of all the marker's > > addresses from a given polygon. So they in fact do not need to click > > the map at all. I don't think there is any need for JS or an array, > > but I may be wrong. > > What I suggested was > * loop through all your markers > * for each marker, get its location [that's where it's analogous to > "click the map to get the location you're interested in"] > * determine whether that location is in the requested polygon > * if it is, push it on to the output list > > The point-in-polygon analysis could be performed in the client browser > or by a script on the server using GDownloadUrl(). > > It would be far easier if your database records for the marker > contained a field saying which polygon contained it, but I don't know > whether that's the case or not. If it is, simply query the database > for markers in that polygon. > > Andrew --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
