Oops. Here's James's demo: http://gmaps-samples-v3.googlecode.com/svn/trunk/fusiontables/chicago-homicides.html
On Fri, Jun 3, 2011 at 9:50 AM, Chris Broadfoot <[email protected]> wrote: > Check out James's demo here, which shows how to update a query (or style): > You want something like > > fusionLayer.setOptions({ > query: { > select: 'geometry', > from: tableid, > where "'Sub-sector'=1" > } > }); > > On Fri, Jun 3, 2011 at 4:43 AM, Reba <[email protected]> wrote: > >> Thanks, Chris. I knew it had to be something like that! >> >> So using the new syntax I'm having trouble changing a query on the >> existing layer. I think I'm missing a method? >> >> function changeUP(){ >> fusionLayer.set{ query:{ select: 'geometry', from: tableid, >> where: 'Sub-sector=1' } } ; >> } >> >> You can probably tell I'm not really a programmer... >> >> On Jun 2, 6:12 am, Chris Broadfoot <[email protected]> wrote: >> > You're mixing current syntax (note that there is no setQuery method on >> > FusionTablesLayer anymore) and legacy syntax. >> > >> > Choose one or the other. I would suggest using the new style syntax { >> query: >> > { select: ..., from: ..., where: ... } } >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > On Thu, Jun 2, 2011 at 11:08 AM, Reba <[email protected]> >> wrote: >> > > I have a google fusion table loaded as a layer onto my Google Map. >> > > Everything's showing up fine, but when I try to change the selection >> > > criteria using .setQuery it's not returning anything. Any help is >> > > most appreciated. >> > >> > > see the working example here: >> > >http://www.rbompiani.com/exampleCode.html >> > >> > > code: >> > >> > > <script type="text/javascript" id="script"> >> > >> > > var center = new google.maps.LatLng(42.68, 8.79); >> > > var zoom = 3; >> > > var tableid = 934341; >> > > var location_column = 'geometry'; >> > > var map, fusionLayer; >> > >> > > function initialize() { >> > > map = new google.maps.Map(document.getElementById('map_canvas'), >> > > { >> > > center: center, >> > > zoom: zoom, >> > > mapTypeId: 'roadmap' >> > > }); >> > >> > > fusionLayer = new google.maps.FusionTablesLayer({ >> > > query: { >> > > select: location_column, >> > > from: tableid >> > > }, >> > > }); >> > >> > > fusionLayer.setMap(map); >> > >> > > } >> > >> > > function changeUP(){ >> > > fusionLayer.setQuery("SELECT 'geometry' FROM " +tableid+ " >> > > WHERE 'Sub-sector'=1"); >> > > } >> > >> > > </script> >> > >> > > -- >> > > 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. >> > >> > --http://twitter.com/broady >> >> -- >> 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. >> >> > > > -- > http://twitter.com/broady > -- http://twitter.com/broady -- 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.
