Hi Josh,
I did as you suggested here to get GeoPoint object for Proximity criterion:
Address address = new Address();
address.setCityName("Fairfield");
address.setCountryCode("US");
address.setProvinceName("California");
GeoLocationSelector selector = new GeoLocationSelector();
selector.setAddresses(new Address[] {address});
GeoLocation[] geoLocationResult = geoLocationService.get(selector);
But for some reason it has stopped working correctly recently for several
addresses:
- Marina,California,United States
- Napa,California,United States
- Orange,Orange,California,United States
- and many others addresses
GeoLocationService
<https://developers.google.com/adwords/api/docs/reference/v201406/GeoLocationService>
return InvalidGeoLocation
for these addresses.
What is different way to get correct GeoLocation if you know address
GeoLocationService
<https://developers.google.com/adwords/api/docs/reference/v201406/GeoLocationService>
is
not working as expected?
четверг, 31 июля 2014 г., 1:29:18 UTC+3 пользователь Josh Radcliff (AdWords
API Team) написал:
>
> Hi,
>
> The IDs in the link you provided
> <https://developers.google.com/adwords/api/docs/appendix/geotargeting> are
> for creating Location
> <https://developers.google.com/adwords/api/docs/reference/v201406/CampaignCriterionService.Location>
> criteria,
> not GeoPoint criteria. If you are instead interested in GeoPoint
> <https://developers.google.com/adwords/api/docs/reference/v201406/CampaignCriterionService.GeoPoint>
> objects,
> you can look those up by *address* using GeoLocationService
> <https://developers.google.com/adwords/api/docs/reference/v201406/GeoLocationService>,
>
> but not by ID. *GeoPoint*s do not have IDs -- just
> *latitudeInMicroDegrees* and *longitudeInMicroDegrees*.
>
> If you are looking to find GeoPoint information for a given Proximity
> <https://developers.google.com/adwords/api/docs/reference/v201406/CampaignCriterionService.Proximity>
> criterion,
> you can simply include the field "GeoPoint" in your *Selector* when you
> issue a CampaignCriterionService.get
> <https://developers.google.com/adwords/api/docs/reference/v201406/CampaignCriterionService#get>
> .
>
> Regards,
> Josh, AdWords API Team
>
> On Wednesday, July 30, 2014 4:22:02 PM UTC-4, Dzmitry Zahusta wrote:
>>
>> Using LocationCriterionService
>> <https://developers.google.com/adwords/api/docs/reference/v201406/LocationCriterionService>
>> I
>> can get only list of Location criterion
>> <https://developers.google.com/adwords/api/docs/reference/v201406/LocationCriterionService.LocationCriterion>
>> and
>> unfortunately it has nothing to do with GeoPoint objects...
>>
>> среда, 30 июля 2014 г., 16:45:31 UTC+3 пользователь Josh Radcliff
>> (AdWords API Team) написал:
>>>
>>> Hi,
>>>
>>> Yes, you can use the LocationCriterionService
>>> <https://developers.google.com/adwords/api/docs/reference/v201406/LocationCriterionService>
>>> where
>>> your *Selector* has a predicate based on the *Id* field. See the
>>> example request below.
>>>
>>> Cheers,
>>> Josh, AdWords API Team
>>>
>>> <get xmlns="https://adwords.google.com/api/adwords/cm/v201406">
>>> <selector>
>>> <fields>Id</fields>
>>> <fields>LocationName</fields>
>>> <fields>CanonicalName</fields>
>>> <fields>DisplayType</fields>
>>> <fields>ParentLocations</fields>
>>> <fields>Reach</fields>
>>> <fields>TargetingStatus</fields>
>>> <predicates>
>>> *<field>Id</field>*
>>> <operator>IN</operator>
>>> <values>2276</values>
>>> <values>2278</values>
>>> </predicates>
>>> <predicates>
>>> <field>Locale</field>
>>> <operator>EQUALS</operator>
>>> <values>en</values>
>>> </predicates>
>>> <ordering>
>>> <field>LocationName</field>
>>> <sortOrder>ASCENDING</sortOrder>
>>> </ordering>
>>> </selector>
>>> </get>
>>>
>>> On Wednesday, July 30, 2014 9:28:20 AM UTC-4, Dzmitry Zahusta wrote:
>>>>
>>>> Hi!
>>>>
>>>> Is it possible to get GeoPoint by Criteria ID? I mean Criteria ID that
>>>> can be found here
>>>> <https://developers.google.com/adwords/api/docs/appendix/geotargeting>.
>>>>
>>>
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
You received this message because you are subscribed to the Google
Groups "AdWords API Forum" 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/adwords-api?hl=en
---
You received this message because you are subscribed to the Google Groups
"AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
Visit this group at http://groups.google.com/group/adwords-api.
To view this discussion on the web visit
https://groups.google.com/d/msgid/adwords-api/1b90ab5c-9383-4d4e-a377-ae33ca891c36%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.