Latitude/Longitude from Order Address

Latitude/Longitude from Order Address

Chris_Youderian
Shopify Partner
5 1 0

I'm building my first Shopify app. I want to display recent orders on a custom map. The Order API indicates that I should be able to get the latitude/longitude of a billing or shipping address. However, when I try to do this:
order.billing_address.latitude
I'm getting a response of None. I have no trouble getting any other properties (address1, city etc).

Does Shopify geolocate all order addresses? My order was a bogus test order. Any idea why I can't retrieve the lat/lon?

Thanks!

Chris

Replies 3 (3)

Chris_Youderian
Shopify Partner
5 1 0

Solved the problem.  Orders are not geolocated until they are fulfilled.

Chris

dstivanov
Shopify Partner
3 0 3

Hey Chris! Do you know whether the geolocation comes from Shopify itself or from the fulfilment apps that are actually doing the fulfilment ?

Chris_Youderian
Shopify Partner
5 1 0

I believe it's from Shopify itself as they are geocoded even if you aren't using a fulfillment service.