Thanks for your answer,

i don't see which field is wrong.

my code :

// Create proximity targets.
                $geoTargetProx = new ProximityTarget();

                $legeopoint= new GeoPoint();
                $legeopoint->latitudeInMicroDegrees='45746250';
                $legeopoint->longitudeInMicroDegrees='4866748';

                $geoTargetProx->geoPoint = $legeopoint;
                $geoTargetProx->radiusDistanceUnits = 'KILOMETERS';
                $geoTargetProx->radiusInUnits = '150';

                 // Create addresses.
                $address1 = new Address();
                $address1->streetAddress = '4 rue Villon';
                $address1->cityName = 'Lyon';
                $address1->provinceName = 'Rhones';
                $address1->postalCode = '69003';
                $address1->countryCode = 'FR';

                $geoTargetProx->address = $address1;
                $geoTargetProx->allowServiceOfAddress = true;

                $proxTargetOperation = new CampaignTargetOperation();
                $proxTargetOperation->operand = $geoTargetProx;
                $proxTargetOperation->operator = 'SET';

                $operations = array($proxTargetOperation);

                // Set campaign targets.
                $result = $campaignTargetService->mutate($operations);

I really don't see what is wrong.

I get this error :

Unmarshalling Error:
com.google.ads.api.services.campaignmgmt.campaigntarget.v200909.jaxbgen.ProximityTarget
cannot be cast to
com.google.ads.api.services.campaignmgmt.campaigntarget.v200909.jaxbgen.TargetList

Can you help me ?

Thanks a lot !



On Feb 24, 3:55 pm, AdWords API Advisor <adwordsapiadvi...@google.com>
wrote:
> Hi,
>
> The documentation for the ProximityTarget is here:
>
>  http://code.google.com/intl/fr/apis/adwords/v2009/docs/reference/Camp...
>
> All you need to do is create a new ProximityTarget, set the fields,
> and add it to the list of targets in your GeoTargetList.  Are there
> specific fields you have questions about?
>
> Best,
> - Eric Koleda, AdWords API Team
>
> On Feb 24, 9:39 am, Tang <guillaumedeneuv...@gmail.com> wrote:
>
> > nobody can help me ? Please ...
>
> > On Feb 23, 7:24 pm, Guillaume <voisineo...@gmail.com> wrote:
>
> > > Hi,
>
> > > i actually use the Adwords API in PHP, all is working good except for
> > > Geotargeting.
>
> > > if i want to target a country i do :
>
> > > // Create geo targets.
> > > $geoTargetList = new GeoTargetList();
> > > $geoTargetList->campaignId = $campaignId;
> > > $geoTargetList->targets = array(new CountryTarget('FR'));
>
> > > But i don't know how to use ProximityTargets with the api ? I found
> > > nothing on the forum :(
>
> > > I just would like to target circular geographical regions using exact
> > > coordinates.
>
> > > I have to use "circle" 
> > > (http://code.google.com/intl/fr/apis/adwords/docs/developer/Circle.html
> > > ) but i don't know how.
>
> > > Can someone help me ?
>
> > > Thanks
>
>

-- 
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-...@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.

Reply via email to