Hi Sebastien- Are you trying to add a full-text search to the code? If so, you could just add keywords to your array of markers, and when doing the search, just iterate through the title, description, and keywords for each marker and return it as long as it matches the search query.
- pamela On Fri, Apr 3, 2009 at 7:23 AM, Sebastien <[email protected]>wrote: > > Hi Pam, thanks alot for your answer. > That demo is getting pretty close to what I want to do, but consider > this: > If we go back to your demo on "Toggling Marker Categories" - which > also loaded from an XML where each marker had a "category" attribute > (bar or restaurant) - do you think it would be possible for the user > to perform a search on those categories? Example: by typing > "restaurant" in the search bar he would see all the restaurant marker > (just as if he had untoggled "bars"). > That would be great. > > Thanks very much for your help, > > Sebastien > > On Mar 31, 11:47 am, pamela fox <[email protected]> wrote: > > Hi Sebastien- > > There is now a demo of how to search markers loaded from XML for the > closest > > markers to an address: > http://gmaps-samples-flash.googlecode.com/svn/trunk/demos/MarkerXmlSe... > > > > - pamela > > > > On Tue, Mar 31, 2009 at 6:46 AM, pamela fox <[email protected]> > wrote: > > > Hi Sebastien- > > > It uses the Google AJAX Search API via HTTPService, yes, and then uses > the > > > open-source JSON parser to turn the JSON result into AS3 objects and > display > > > them on the map. If the search isn't working for you, check your NET > > > requests to see if the request is being sent off correctly, and what it > > > returns. > > > > > If you have a KML file on a public domain that Google has indexed, you > can > > > use the Local Search on that (using the site: restrict operator. See: > > > > >http://googlemapsapi.blogspot.com/2008/05/geo-search-20-data-in-data-. > .. > > > > > Otherwise, you can just do a search in ActionScript of your markers. > You > > > can do for loop testing GLatLng.distanceFrom on all of the coordinates, > and > > > just show the closest ones. > > > > > - pamela > > > > > On Sun, Mar 29, 2009 at 4:54 AM, Sebastien <[email protected] > >wrote: > > > > >> Hi, > > > > >> I'm trying to set up my own "Local Search", based on this example: > > > > >>http://gmaps-samples-flash.googlecode.com/svn/trunk/demos/LocalSearch. > .. > > > > >> I haven't been very good at understanding how this works. Does it use > > >> the Google AJAX search API? > > >> I downloaded the zip pack (with the JSON files) on my computer, tried > > >> to compile the map with Flex Builder, but the "Search this site" > > >> option doesn't work anymore. > > > > >> My questions: > > >> - Where does this Local Search map get its information? I haven't seen > > >> any reference to a database or kml file in the code. > > >> - Can I make this search tool work on my own XML file (I have a list > > >> of markers)? > > >> - If this doesn't work on an XML file, how can i perform a search on > > >> an XML file? > > > > >> Thanks for your help! > > > > >> Sebastien > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Maps API For Flash" 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-for-flash?hl=en -~----------~----~----~----~------~----~------~--~---
