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

Announcements

News and Announcements icon
Community site session details

Community site session details

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

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 326 Most Valuable Professional

#2
11manish Profile Picture

11manish 168

#3
sannavajjala87 Profile Picture

sannavajjala87 75 Super User 2026 Season 1

Last 30 days Overall leaderboard