web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / How to reduce the redu...
Power Apps
Unanswered

How to reduce the reduce the zoom of google map while launching

(0) ShareShare
ReportReport
Posted on by 2

I am using the below code on the display form to open a google map:

Launch(
"https://www.google.com/maps/search/?api=1&query=" & DataCardValue16.Text & "," & DataCardValue18.Text
)

 

It is working perfect, but it opens a big zoom, I mean the place till the street, what to have a view at a state level, 

I mean more reduced zoom, so that I can see the state and country while opening, and if required the user will zoom manually on the screen.

 

Pls. advise

Categories:
I have the same question (0)
  • TheRobRush Profile Picture
    11,128 Moderator on at

    what is your query. lat long? or like city state etc

  • MIA27 Profile Picture
    2 on at

    Its Lat and long. The code is working fine only the issue is the zoom, 

    Code I am using is as below 

    Launch(
    "https://www.google.com/maps/search/?api=1&query=" & DataCardValue16.Text & "," & DataCardValue18.Text
    )

  • TheRobRush Profile Picture
    11,128 Moderator on at

    So far as I can gather from google documentation, zoom level is only a parameter in when using map_action=map

     

    would work liek this (where lat.text & long.text are chanegd to your inputs, and you can edit zoom level to liking)

    Launch(
    "https://www.google.com/maps/@?api=1&map_action=map&center="&lat.Text&","&long.Text&"&zoom=10")
  • MIA27 Profile Picture
    2 on at

    Tried your advised code, its not working, below is the screen shot of the error and the applied code

     

    MIA27_0-1679153637597.png

     

  • MIA27 Profile Picture
    2 on at

    Later tried the below it worked, its my mistake of understanding but the Red mark on the map for the exact location is not getting obtained. So the user will be confused

    Launch(
    "https://www.google.com/maps/@?api=1&map_action=map&center="&DataCardValue16.Text&","&DataCardValue18.Text&"&zoom=10")

  • Verified answer
    TheRobRush Profile Picture
    11,128 Moderator on at

    Yah @MIA27 the google documentation for google maps does not indicate any available parameters to control zoom through the link while also maintaining the visibility of markers. If you want markers, it just opens in the default view, and user will have to control the zoom. 

  • MIA27 Profile Picture
    2 on at

    Ok, noted.

    So my code which i posted to my question is ok then, as it open the google map with the red icon marker and user can later zoom in as required.

    Thank you.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard