I walked through the examples and the Maps code but I couldn't find a
find a spatial query.
Is the feature not implemented?
regards
Christian
But i wonder how to use this with coordinates search, what parameters
are expected ? Is the ones one this page : http://mapki.com/wiki/Google_Map_Parameters
I thought i could use use the center location parameter ("sll") and
span parameter ("spn") to retrieve only the features within a certain
region. But i must be doing something wrong since i get exactly the
same number of entries with our without the query :
i get 1000 entries if i use :
ticket = [service fetchFeedWithURL:featuresFeedURL delegate:self
didFinishSelector:@selector(featuresTicket:finishedWithFeed:error:)];
and i also get 1000 entries if i use :
GDataQueryMaps* query = [GDataQueryMaps
mapsQueryWithFeedURL:featuresFeedURL];
[query addCustomParameterWithName:@"ll" value:@"48.844384,2.36412"];
[query addCustomParameterWithName:@"spn" value:@"0.143248,0.344353"];
ticket = [service fetchFeedWithQuery:query delegate:self
didFinishSelector:@selector(featuresTicket:finishedWithFeed:error:)];
Your help would be greatly appreciated !
Thanks,
Vincent
Based on the source from GDataQueryMaps.m on the trunk i tried the
following :
GDataQueryMaps* query = [GDataQueryMaps
mapsQueryWithFeedURL:featuresFeedURL];
[query addCustomParameterWithName:@"lat" value:@"48.844384"];
[query addCustomParameterWithName:@"lng" value:@"2.36412"];
[query addCustomParameterWithName:@"radius" value:@"10000"];
ticket = [service fetchFeedWithQuery:query delegate:self
didFinishSelector:@selector(featuresTicket:finishedWithFeed:error:)];
It returns 0 entry (and no error). Without the query and with the map
centered on the same point (48.844384, 2.36412 = paris) i can see over
a 100 placemarks.
Have you been able to do a spatial search on a google "my maps" ?
Thanks,
Vincent.
On 7 jan, 17:18, Greg Robbins <grobb...@google.com> wrote:
> The Google Maps Data API supports a limited set of search query parameters;
> they are listed at
>
> http://code.google.com/apis/maps/documentation/mapsdata/developers_gu...
>
> The Objective-C library does now include the Maps Data API spatial query
> parameters in the top-of-trunk sources; see
>
> http://code.google.com/p/gdata-objectivec-client/source/browse/trunk/...
I finally managed to make it work using the -
fetchFeaturesOfSelectedMap sample.
The problem came from a bug in the maps API, i cannot directly use the
featuresFeedURL property from the MapEntry.
here is how to get the proper featureFeedUrl (extracted from the -
fetchFeaturesOfSelectedMap sample code)
// The Maps API does not provide a clean way to get the URL for the
// snippets feed (bug 2335402)
NSString *featuresStr = [featuresFeedURL absoluteString];
NSString *snippetsStr = [featuresStr
stringByReplacingOccurrencesOfString:@"/full" withString:@"/snippet"];
NSURL *snippetsURL = [NSURL URLWithString:snippetsStr];
GDataQueryMaps* query = [GDataQueryMaps
mapsQueryWithFeedURL:snippetsURL];
[query addCustomParameterWithName:@"lat" value:@"48.844384"];
[query addCustomParameterWithName:@"lng" value:@"2.36412"];
[query addCustomParameterWithName:@"radius" value:@"10000"];
Thanks for your help,
Vincent.
> sources athttp://code.google.com/p/gdata-objectivec-client/source/browse/trunk/...