Thanks Anthony, but that doesn't really answer my question :)

I can create the proximity object...

            $campaignCriterionService = $user->GetService(
'CampaignCriterionService', ADWORDS_VERSION);

            //Set the address
            $address = new Address();
            $address->countryCode = 2826;   //UK Country Code
            
            $prox = new Proximity();
            $prox->address = $address;
            $prox->radiusDistanceUnits = "KILOMETERS";
            $prox->radiusInUnits = 0;

...which gets me up step 3. But how do I use that to retrieve the lat/long 
co-ords of the Proximity object using the recommended 
CampaignCriterionService?

In the old code, you had a GeoLocationSelector which could be used to 
retrieve that data. That no longer exists, and none of the selectors in 
CampaignCriterionService are filterable on proximity.

I want to get the latitude and longitude of country code 2826. What is step 
4? :)


On Thursday, November 12, 2015 at 2:36:57 PM UTC, Anthony Madrigal wrote:
>
> Hey guys,
>
> Here is how most users would create a Proximity criteria in versions 
> v201506 and earlier:
>
>    1. Submit a GeoLocationService.get with the 
>    GeoLocationSelector.address set to the address around which they wanted to 
>    target.
>    2. Verify that the response from #1 was not an InvalidGeoLocation 
>    object.
>    3. Use the returned GeoLocation.geoPoint when creating the Proximity 
>    object, as described here: 
>    
> https://developers.google.com/adwords/api/docs/guides/location-targeting#proximity-targeting
>    .
>    
> You can skip steps 1 and 2 and just use the Address from step 1 as the 
> Proximity.address in step 3 since the GeoLocationService is now sunset in 
> future versions. So instead of using Proximity.geoPoint, use 
> Proximity.address. You will get a failure if the address is invalid when 
> using the CampaignCriterionService.mutate.
>
> Cheers,
> Anthony
> AdWords API Team
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
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 adwords-api+unsubscr...@googlegroups.com.
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/7e5008cc-a527-4b6f-aeb8-939582b887a0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to