imuckyu
(muckyu)
July 16, 2019, 1:48pm
#1
Hi there,
I am trying to get the coordinates (lat&lon) with the google maps API.
For this I tried both extensions jsontools and jsonutils but I can’t get a proper result.
See below the setup. I currently get the red part:
{“lat”:41…,“lng”:-87…}
How can I get ONLY the 41 to display so that I can save it in a variable?
vknow360
(Sunny Gupta)
July 16, 2019, 1:52pm
#2
Why do you want to get a part of coordinate?
Is it not possible to store that in a variable?
imuckyu
(muckyu)
July 16, 2019, 3:06pm
#3
right now I just get this as a result:
{“lat”:41…,“lng”:-87…}
but I want to store only the lat & lng value in a variable - however I am not sure how I can extract just the numbers.
I tried to add another GetStringInSubJSONObject to extract the lat & lng out of location but it gave me an error. I guess I am doing it wrong.
i don’t know if you find a solution but the problem is that with your code you extract in a string the lat and long.
to devide them you can try to use this code:
It’s a Google Place API.
Example:
The KnowWhere App (Map in your hand)
Features:
Automatic and Dynamic. Current Location data refreshes automatically.
Smooth interface.
Shows Location Marker on the basis of current time location.
Searching Category wise Nearby Places like Banks, Schools, Restaurants etc… Bottom Nav-bar is used for category.
Nearby Places results in both list and Markers balloon.
Searching any place in the world that Google covers. Results location data of that place with image.
Tap t…
It’s the same app which was made with Google Place API
For understanding I can help you how to handle json content.
i’m creating an app for the trasports of Milan and i used google maps direction API that returned a long and complicated Json.
can i ask you how you handle json content in you app?
Thanks
ps i’m doing confusion with the post
Yes, you can use any of the 2 extensions.
JsonTool by LukeGackle
JsonUtils by ColinTree
But before proceeding u need to be clear about Array, Object and string. Only then you can parse it correctly.
yes, i’m already working with it but now i would implement direction information and the Json is more complicated so i thought that there was an easier way.
thanks!
Okay, can I borrow some time? To make you understand
vknow360
(Sunny Gupta)
August 13, 2019, 2:42pm
#13
Hi
Is there any free alternative available to Places Api?
It is costly so any one can suggest a free one.
if you use the “basic data”: address_component
, adr_address
, formatted_address
, geometry
, icon
, name
, permanently_closed
, photo
, place_id
, plus_code
, type
, url
, utc_offset
, vicinity
the google Places API is free for less then 100,000 request
I will be uploading a guide tonight regarding json. It would be helpful for not only but also many users of this community. Till then hold on.
@vknow360
Yes there are cheap/Free alternatives. Mailbox, LocationIQ, OpenCage etc are there. For more search on google.
wow, thanks a lot !
i’m looking forward to reading it.
link your guide in this discuss if you can, so i receive a notify
1 Like
@simone_sergi
Hope this may help you
.JSON File - How I understood It
What is Json? (Collected from W3Schools )
-JSON stands for JavaScript Object Notation
-JSON is a lightweight format for storing and transporting data
-JSON is often used when data is sent from a server to a web page
-JSON is "self-describing" and easy to understand
My View:
Now a days .JSON is a language which are mostly used in API services, data structures for storing and receiving as well as dor GeoCoding etc.GeoJson is a perfect…
1 Like