Zoom Controls in google maps URL - google-maps

I am building Google Map URL that will point few locations in the map
I want to add Zoom control to the map so users can zoom in and out
all the examples i saw were for java script and coding maps
is there any parameter i can add to the url to get the zooming control
I tried
&callback=initMap
&gestureHandling=cooperative
but non worked
any one know what i have to add to get scrolling and zooming controls?
my current URL looks like this
https://maps.googleapis.com/maps/api/staticmap?zoom=13&gestureHandling=cooperative&size=1200x800&maptype=roadmap&key=AIza***********************&markers=label:1%7C-33.87277000,151.21408000&markers=label:2%7C-33.87257000,151.21520000

Based on the URL request that you have included in your question, I can tell that you are not using Maps URL. Instead, you are using Static Maps API. From the word Static itself, its characterized by a fixed or stationary condition.
Once the map is loaded using Static Maps API, the map will be rendered as an image, therefore, no interactions can be done with the map after loading. You may only adjust the zoom level by adjusting the parameter zoom in the URL.
If you want to be able to dynamically move around the map after loading, then you should opt to using Google Maps Javascript API.
But it seems to me that you are trying to avoid using codes. If this is the case and you just want to load the map using url, then you may use Google Maps URL
https://www.google.com/maps/search/?api=1&query=pizza+seattle+wa
If you want to embed a map to a webpage, then you should use Google Maps Embed API. You do not need an to use javascript codes for this one, just an HTML iframe.
<iframe
width="600"
height="450"
frameborder="0" style="border:0"
src="https://www.google.com/maps/embed/v1/place?key=YOUR_API_KEY
&q=Space+Needle,Seattle+WA" allowfullscreen>
</iframe>
Hope this helps!

Related

Any way to embed maps list view in HTML like what is seen on normal Google Maps?

I'm using the google maps API and am planning on embedding it in a website. I've been able to embed an interactive map using an http request, but I have to click on each individual point of interest to see a little bit of info on the place without images. Just the name, address, and rating. I'd like to be able to recreate the results bar that Google Maps has.
Is this possible with any of the APIs in the maps suite?
Thanks. Here's a pic of what I'm talking about.
The map and markers are what is embeded alone, but as of now I don't think there's a way to get the bar on the left to appear. I'm assuming there's no way.
Like this sir ?
<iframe src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d7021.738121507687!2d-83.73387091940336!3d42.272605630582206!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x883cae45cc20c635%3A0xab7fb96b1315bd3b!2sThe%20Garage%20Bar!5e0!3m2!1sen!2sus!4v1580184370674!5m2!1sen!2sus" width="600" height="450" frameborder="0" style="border:0;" allowfullscreen=""></iframe>

How can i change google map marker for direction using iFrame?

Existing code:
<iframe width="600" height="500" id="gmap_canvas" src="https://maps.google.com/maps?ll=23.6000004,108.0333023&saddr=23.585941, 108.063190&daddr=23.620677, 108.05339+to:23.602400, 108.013489+to:#&z=13&output=embed"></iframe>
AS IS:
TO BE:
or someting noticeable than as is image
You can follow this guide on how to embed a map in your application from the Google Maps (maps.google.com) site. You should get something like this wherein you can copy the HTML code generated and paste it in your site.
Another option is to use the Maps Embed API of the Google Maps Platform which lets you place an interactive map, or Street View panorama on your site with a simple HTTP request. *Note that you need to create a Maps project, enable billing and get an API key first before you can use the Maps Platform APIs. These are also indicated in the public doc.
Hope this helps!
REMOVE +
Follow This Code :
"https://maps.google.com/maps?ll=23.6000004,108.0333023&saddr=-10.1630425,123.6226121&daddr=-10.1546409,123.6622598&to:23.602400,108.013489&to:#&z=13&output=embed"

Google Maps: Change default Embedded mapTypeId or use controls from Embedded API map on Javascript API map?

Neither the embedded api nor the javascript api versions of Google maps will behave how I'd like, please help.
The embedded api doesn't allow me to set the default map view to hybrid through the url parameters. I've tried using &t=h but it blacks out the map.
The javascript api version doesn't allow me to set the default controls to the same overlay that the embedded version uses. Specifically, I'd like the address and a link to directions to display on the map (the control element in the upper left corner of an embedded api map). See the pictures for more clarification.
So the question:
Is it possible to change the default map type of an embedded api Google Map to 'hybrid' using any method? Please provide a complete link example if demonstrating with '&t=h' (does the parameter need to be in a certain location in the URL, ie. before/after some other parameter?).
OR
Is it possible to use the control overlay from an embedded api Google Map on a javascript api Google Map?
Embedded API (Desired controls, wrong default mapTypeId)
Javascript API (Desired default mapTypeId, wrong controls)
Success!
Using the embedded API, '&maptype=satellite' will work instead of '&t=h'.

Removing top left panel of embedded google map

I'm embedding a google map with a marker on it using the embed feature whereby i'm given the URL below. My problem is that the top left panel encroaches too much and I would like to remove or contract it. I this possible? I have seem somewhere that introducing "output=embed" somewhere into the url helps but I can't get anything to happen in this example..
<iframe src="https://www.google.com/maps/embed?pb=!1m14!1m8!1m3!1d48862.31335129727!2d-1.763692!3d53.701791!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x0%3A0x2c8856d4951c5657!2sFrederick+Crowther+and+Son+Ltd!5e1!3m2!1sen!2suk!4v1421754685023" width="469" height="345" frameborder="0" style="border:0"></iframe>
I don't think this is possible.
You would need to use the google maps api.
This definitely does allow you to choose which default google maps controls to show and hide.
It's not very difficult to use the api. Here is a good tutorial on setting a basic map with markers.
Here is a guide to hiding controls or using custom ones.

Centering InfoWindow Google Map IFrame

Is there a way to center the pop up window (info window) on a google map iFrame to make sure that it does not get cut off?
WOuld it be easier for me to use the Google Map API instead of iFrame? If so, is there an API call that would give me the same information by default on a the infoWIndow?
Note: I have tried using Google Map API and I prefer this over using iFrame. The only downside is that I do not get the extra information that comes with using google map iFrame. It looks like I need to populate this window with HTML by myself.
Btw here's a good example of how to create a custom InfoWindow.
https://developers.google.com/maps/documentation/javascript/overlays#InfoWindows
You can use any html such as custom headers, divs and links
And here's the Placed API with Google Maps:
https://developers.google.com/maps/documentation/javascript/places