Exact Definition/Format for Microdegrees for GeoPoint

8 views
Skip to first unread message

Day Davis Waterbury

unread,
May 2, 2016, 4:40:05 PM5/2/16
to AdWords API Forum
What exact format is expected the latitudeInMicroDegrees and longitudeInMicroDegrees when creating a geoPoint for a Proximity CampaignCriterion? 


For example, when I have a latitude in decimal degrees of 45.3911638 and I convert it to microdegrees as 45391163, I am seeing the following error:


[CriterionError.INVALID_LATITUDE @ operations[0].operand.criterion.geoPoint.latitudeInMicroDegrees]

Here's my code:

{
:operator => 'ADD',
:operand => {
:campaign_id => self[:campaign_id],
:criterion => {
:xsi_type => 'Proximity',
:geo_point => {
:latitude_in_micro_degrees => (shop[:lat] * 1_000_000).to_i,
:latitude_in_micro_degrees => (shop[:lng] * 1_000_000).to_i
},
:radius_distance_units => RADIUS_DISTANCE_UNITS,
:radius_in_units => radius
}
}
}
Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages