getting an entity's lat/lon

3 views
Skip to first unread message

tsmango

unread,
Mar 26, 2010, 10:35:05 AM3/26/10
to GeoAPI
Hello,

I was wondering if there was a way to retrieve an entity's lat/lon
when doing an mql search. From everything I can tell, this isn't
possible. In fact, it doesn't seem to be possible to get the lat/lon
of any entity from any of the provided API methods.

Unfortunately, because of this, if I want to display these entities on
a map, I must first geocode every single address. This significantly
increases the amount of time it takes for my application to respond to
queries.

Is there a reason for not including the lat/lon of entities? Are you
planning on including this at some point? Or am I simply missing
something?

Thank you very much, in advance.

- Tom

Othman

unread,
Mar 26, 2010, 10:47:58 AM3/26/10
to GeoAPI
Hi Tom,

You can do that by requesting any specific entity.

For example, if you query:

http://api.geoapi.com/v1/e/ritual-coffee-roasters-san-francisco-ca-94110?apikey=demo&pretty=1

one of the fields is 'geom' which contains that entity's lat/lon. Is
this what you were looking for?

Thanks,
Othman

Othman

unread,
Mar 26, 2010, 12:07:50 PM3/26/10
to GeoAPI
Tom on our team just pointed out that I probably minsunderstood your
question. If you're trying to get lat/lons out of an mql search - so
you get their location in a single query, you should include
"geom:null" in the query. For example:

{
"lat": 37.75629
"lon": -122.4213
"radius": "0.2km"
"entity": [{
"guid": null
"type": "business"
"geom": null
"view.listing": {
"a:verticals": "restaurants"
"b:verticals": "food-and-drink:coffee-houses"
"address": []
"name": null
}
}]
}

On Mar 26, 7:47 am, Othman <oth...@gmail.com> wrote:
> Hi Tom,
>
> You can do that by requesting any specific entity.
>
> For example, if you query:
>

> http://api.geoapi.com/v1/e/ritual-coffee-roasters-san-francisco-ca-94...

tsmango

unread,
May 23, 2010, 8:30:00 PM5/23/10
to GeoAPI
I completely missed your second post and when I came back just now to
look something else up, I saw it. That is exactly what I was looking
for. Thank you so much, I really appreciate it!
Reply all
Reply to author
Forward
0 new messages