Hi Team,
I wanted to get the geocordinates lattitude and longitude from address entered and show in map .
Please suggest as the co-ordinated are getting 0.I have used geocoding extension.
Hi Ujwwala
You are trying to print lat and long only. Can you check printing Error What is shows? You may get some idea from there. It has one output of Error as well.
Also have you marked Sensor True or false?
Hi ujwwala,
For address to lat long, you need to use google geocoding API (https://developers.google.com/maps/documentation/geocoding/overview)
The easiest is call this REST
https://maps.googleapis.com/maps/api/geocode/json?address=[YOUR ADDRESS]&key=[YOUR_API_KEY]
But you need Google API key to do this.
Another alternative, you can use openstreetmap geocoding (I already put this function on my component https://www.outsystems.com/forge/component-overview/8029/openstreetmapplugin)
Hi,
I have used geocoding extension and using api key but it says
1. please hide your API Key (:D)
2. the API key must set with Geocoding API (see my image below on google developer console)
Still not working
Copy the error message (complete) to here
Thanks
I got some incorrect information to you, sorry about that.
The address, you must replace space with enter as example below.
The address is : jakarta kebon jeruk raya perjuangan
you must put it as example below, change space to plus (jakarta+kebon+jeruk+raya+perjuangan)
https://maps.googleapis.com/maps/api/geocode/json?address=jakarta+kebon+jeruk+raya+perjuangan&key=[MYKEY]
I have entered only one city and hence no + reqquired but not working.It is takein %20 auto.
After checking your url, you put on your address :
https://maps.googleapis.com/maps/api/geocode/json?address=mumbai%20and%20key=Alzaxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
The ampersand is incorrect, maybe you want to encode your url, but you shouldn't encode the url, so the url should be :
https://maps.googleapis.com/maps/api/geocode/json?address=mumbai&key=Alzaxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hello ToTo
I had discussion with Ujjawala. They have created Google API but the account and project is not associated with any Billing Account. So, whatever we do if the API is not associated it will not work. So, there is no mean for trying with the same.
https://cloud.google.com/maps-platform/pricing
@ujwwala tembbekar, now there are two options for you -
Please feel free to ask in case of any further question.
Regards
I see,
If the problem is the pricing of google cloud, then back to my first answer, use the API open street map (its open source)
example : https://nominatim.openstreetmap.org/search/mumbai?format=json&addressdetails=1&limit=1
Hi Ujjawala
Please do let me know if this has solved the issue. Else I will share the new OML with Testing API that will help you out.
Hi Manish,
Please share oml where geocoding extension example with CITY as input to be shown in map
Hello Ujwwala
Sure, I am sent one message to you regarding the OML. Please look into your inbox.
I am not getting to show location in map,It is showing as marker,
Please check
ujwwala,
Your code is very messy and not using best practice (ie : client action called multiple server action) also you didn't call the marker function but expecting marker to be shown on the map.
I tried to modify your oml (it should work now) but I didn't fix the best practice using Outsystems (sorry will take more time to do this than to show you how to use the plugin)
Hi Toto,
Thank you ,It is working but I have tried similar in my existing but not working,
Can you please suggest
Hi Ujwwala,
Can I ask what is not work ? because I already download your oml and it working.