130
Views
9
Comments
Google Maps API, Long and Lat work but not Address
Question

So I can bring up a Google map from the API if I put in longitude and latitude but no matter how I format, I cannot put in Address and get a map.

In the attached screenshot, I show two possibilities. When I use just the long and lat, I get new york city.

If I try and get current city, I get nothing.

I have also tried "New York City" and still got nothing.

Any thoughts?

I have left off the API key for obvious reasons but I do have one and with credit card and it works with long and lat, so that is not the problem.




Screenshot 2021-11-15 182236.png
2021-11-08 12-36-10
Pedro Canário

Hi Alan PeslaK,

See this post, it is the answer to the question you asked

https://www.outsystems.com/forums/discussion/64205/how-to-use-google-maps-library-for-reactive-web-app/


Let me know if you can solve your problem or need help.


Best regards,

Pedro C.

UserImage.jpg
Alan PeslaK

Thanks. I appreciate the reply but the longitude and latitude work but not the city. The very first video on the Outsystems set started page shows city working but with no fetch modifications. Something is amiss here.

2021-11-08 12-36-10
Pedro Canário

Can you share the .oml to see what's going on? Dont share your API Key


Best regards,

Pedro C.

2021-11-08 12-36-10
Pedro Canário

Hi Alan PeslaK,

I  validate your .oml and everything you have done seems to be correct.

Anyway, I did some tests in my personal environment and I get the location when I put in the Address "New York" or "New York City", but i need to have a valid API Key. 

If I try with a non-valid API Key the map does not return the desired location (If I search by Address), but even without a non-valid API Key the latitude and longitude work correctly.

In one of your previous posts (This Post) you asked how to generate and use the API Key, make sure you have done all the necessary steps.  Go to the Google API Console here https://console.developers.google.com/ navigate to the API Manager > Credentials page. You should be able to manage your own API keys from here.

There is a more detailed guide from this page https://developers.google.com/maps/documentation/javascript/get-api-key but more related to scripting.


Validate your API key and try again, and tell us if you solved the problem.


Best Regards,

Pedro C.

UserImage.jpg
Alan PeslaK

I really don't know what the deal is. I have a Google Maps API, enclosed in "",

I tried to hard code "New York City" but nothing

The longitude and latitude do seem to work without a key but definitely puzzled as to why city won't work.


I appreciate all your help. Does the small data file come through in the .omi file? I am trying to replicate the video that is on the get started page of the outsystems start screens

2021-11-08 12-36-10
Pedro Canário

Hi again,

I am trying to help you solve the problem. 

As i sai for example, if you're using addresses instead of coordinates, you'll need an valid API key for the component to use the Google Geocoding API and convert addresses to latitude / longitude.

Validate the restrictions of the api key you created, put none as in the print below.


Best regards,

Pedro C.

UserImage.jpg
Alan PeslaK

I appreciate everything you are doing but it just doesn't work. I have an unrestricted key. I have a credit card on file but it just doesn't work. I will try and contact via your contact link.

UserImage.jpg
Alan PeslaK

I sincerely appreciate all of the work in trying to resolve this but I added Geocoding and Geolocation APIs from Google, generated a new API key and this still doesn't work. I thought the intro video would be a great way to start my students into Outsystems but these issues have made it too kludgy. I have found a workable solution with Here Maps and have switched to that. I think Outsystems should remove the video on the Get Started page. It just doesn't work like the video shows.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.