cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
coder57
Frequent Visitor

No pushpins displaying in GetMapV2 when used with an imagine

Hi 

I have a map displaying in power apps via Bing Maps, all looks good but I can not display a push pin 

The formula for the image is

 

BingMaps.GetMapV2("Road",sld_Zoom.Value,First(ApiPostCode).result.latitude,First(ApiPostCode).result.longitude,
{pushpin:First(ApiPostCode).result.latitude & "," & First(ApiPostCode).result.longitude&";65;Test"})

 

ApiPostCode is a collection from the call to the API which is populating ok

sld_Zoom = a slider control value

 

The output is below

no pushpin.png

Can any one spot an error in my code please

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
v-bofeng-msft
Community Support
Community Support

Hi @coder57 :

Firstly let me explain why you encountered this problem:

The key is syntax. The syntax of GetMapV2 and GetMap is different, your formula is applicable to GetMap but not to GetMapV2.

Secondly,please delete "V2" and try again:

 

BingMaps.GetMap("Road",sld_Zoom.Value,First(ApiPostCode).result.latitude,First(ApiPostCode).result.longitude,
{pushpin:First(ApiPostCode).result.latitude & "," & First(ApiPostCode).result.longitude&";65;Test"})

 

Best Regards,

Bof

View solution in original post

6 REPLIES 6
v-bofeng-msft
Community Support
Community Support

Hi @coder57 :

Firstly let me explain why you encountered this problem:

The key is syntax. The syntax of GetMapV2 and GetMap is different, your formula is applicable to GetMap but not to GetMapV2.

Secondly,please delete "V2" and try again:

 

BingMaps.GetMap("Road",sld_Zoom.Value,First(ApiPostCode).result.latitude,First(ApiPostCode).result.longitude,
{pushpin:First(ApiPostCode).result.latitude & "," & First(ApiPostCode).result.longitude&";65;Test"})

 

Best Regards,

Bof

View solution in original post

Hi Bof. Thanks. Btw is there a set of documentation for this. I have Googled but can not seem to find it. 

v-bofeng-msft
Community Support
Community Support

Hi @coder57 :

I think this link will help you a lot:

Get static map (Preview) 

BTW,I prefer to use the URL directly to get the static map.

I think this link will help you a lot:

Get a Static Map 

Best Regards,

Bof

coder57
Frequent Visitor

Hi I have found some docs Here and it meantions that GetMap is deprecated. In the docs there are no syntax examples.

Do you have an example for the GetMapV2 syntax?

Hi @coder57 :

BingMaps.GetMapV2(
    "Road",
    15,
    Location.Latitude,
    Location.Longitude,
    {
        pushpinLatitude: Location.Latitude,
        pushpinLongitude: Location.Longitude,
        pushpinIconStyle: 65
    }
)

Best Regards,

Bof

Thanks.

When I tried to use the URL direct I found the map did not display in powerapps for Android or iOS. Which was a pain. I will test this tonight and mark up as the solution...many thanks again and have a good time

 

 

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (1,602)