cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
sajarac
Super User
Super User

BingMaps.GeoLocationByPoint failed

Hi there.

 

Question here?

 

I am having this error very often, or almost every time when I open the app.

On the "OnStart" property I have:

 

image1.png

;
Set(
myLocation,
BingMaps.GetLocationByPoint(
Location.Latitude,
Location.Longitude
)
);

 

Somebody could point me the issue, or what is missing?

 

I have no clue.

 

thanks in advance

4 REPLIES 4
jagathsb78
Frequent Visitor

Hi,

 

Im having the Same issue did you Manage to fix this, Any suggestions much Appreciated

 

jagathsb78_0-1667397305049.png

 

 

Thanks

Jag

sajarac
Super User
Super User

Hi @jagathsb78 

On the "Onstart" property I did this:

 

Set(
gblLocation,
{
Lat: Location.Latitude,
Lon: Location.Longitude
}
);

 

This is what I had before but always failed
//Set(myLocation, BingMaps.GetLocationByPoint(Location.Latitude, Location.Longitude).point)//

@sajarac 

 

1. Click db icon on left

2. Click Add Data

3. Type in bing

4. Click Bing Maps

 

poweractivate_0-1667407291714.png

 

5. Check here on the right side and put in your correct API Key.

 

poweractivate_1-1667407415001.png

Do you have an API Key and is it valid?

 

If not you can check here about how to get a Bing Maps Key

 

It is possible that some time ago this did not require an API Key and now it does (not sure though).

Even if you already have the valid API key, does removing the current Bing Maps Connector and re-adding it again with the above steps and putting in your API key work?

 

6. The last step is after you put in the API key in that text field, to just click "Connect" button at the very bottom of the pane.

 

7. Now try to use the Connector. Does it work?

 

@sajarac 

 

In case the above does not work:

 

1. The argument you are giving it might be Text. try using Value() and see if it works

 

BingMaps.GetLocationByPoint(Value(someTextLat),Value(someTextLon))

 

2. Try putting Location.Latitude as the Text property of a Label to test and do the same with Location.Longitude in another Label to test. Do the values shown look like something that could be fed into the above function without error? 

 

3. It's possible at certain points in time such as in the very beginning, these values  Location.Latitude and Location.Longitude might be ultimately returned by the device in an internal implementation somehow, and are not available or not valid at certain points in time. You might need to surround the call to BingMaps with an If function check and make sure these values are currently valid first before actually feeding them to the function. If they are not valid, to let it check again after some time such as 1 second or so. You might sometimes need to use a Timer control to do this, and to have it retry automatically in a second or so if the value is found not to be valid, but if it is valid, to go ahead and feed it into the function, and not try again.

 

 

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (5,509)