Chris Watson
Portfolio | http://vism.ag/inkplay
Vis Mag | http://vism.ag
Creative Maps | http://vism.ag/maps
![]() |
tweeted: Peace Wall in Peckham | Peckham Shed: http://t.co/zvLM7J6 |
--
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 google-map...@googlegroups.com.
To unsubscribe from this group, send email to google-maps-js-a...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-maps-js-api-v3?hl=en.
// If the status of the geocode is OK
if (status == google.maps.GeocoderStatus.OK) {
// Change the center and zoom of the map
map.setCenter(results[0].geometry.location);
map.setZoom(10);
// OPTIONAL: find the new map bounds, and run a spatial query to return
// Fusion Tables results within those bounds.
sw = map.getBounds().getSouthWest();
ne = map.getBounds().getNorthEast();
layer.setOptions({
query: {
select: 'lat',
from: tableid,
where: "ST_INTERSECTS(lat, RECTANGLE(LATLNG(" + sw.lat() + "," + sw.lng() + "), LATLNG(" + ne.lat() + "," + ne.lng() + ")))"
}
});
}
});
}to perform somethign like this;
function changeMap() {
var searchString = document.getElementById('searchString').value.replace("'", "\\'");
layer.setQuery("SELECT 'geometry' FROM " + tableid + " WHERE 'name' CONTAINS IGNORING CASE '" + searchString + "'");
// If the status of the searchString is OK
if (status == google.maps.layer.setQueryStatus.OK) {
// Change the center and zoom of the map
map.setCenter(results[0].geometry.location);
map.setZoom(10);
// OPTIONAL: find the new map bounds, and run a spatial query to return
// Fusion Tables results within those bounds.
sw = map.getBounds().getSouthWest();
ne = map.getBounds().getNorthEast();
layer.setOptions({
query: {
select: 'lat',
from: tableid,
where: "ST_INTERSECTS(lat, RECTANGLE(LATLNG(" + sw.lat() + "," + sw.lng() + "), LATLNG(" + ne.lat() + "," + ne.lng() + ")))"
}
});
}
});
}thats how i picture it but doubt its as simple as i tweaked it
Chris Watson
Portfolio | http://vism.ag/inkplay
Vis Mag | http://vism.ag
Creative Maps | http://vism.ag/maps
![]() |
tweeted: The Visual Think Map Daily is out! http://t.co/lLMGBTa |