Set specific Google maps API location - javascript

I am trying to get google maps to show on my website, with a specific pinpoint of a chosen address. In order to achieve this, I am trying to use google maps api, however I can only get the basic view of the map without narrowing it down to my chosen location.
<iframe width="100%" height="400px"
frameborder="0" scrolling="no" marginheight="0" marginwidth="0"
src="http://maps.google.com/maps? hl=en&ie=UTF8&ll=37.0625,-95.677068&spn=56.506174,
79.013672&t=m&z=4&output=embed">
</iframe>
Am I on the right track?

assuming you lat lng are 37.0625,-95.677068 you can try
<iframe width="100%" height="400px" frameborder="0"
scrolling="no" marginheight="0" marginwidth="0"
src="http://www.google.com/maps/place/37.0625,-95.677068"></iframe>

Try search specific place on maps.google.com, share the location and use embed code.

Related

Storing Youtube video URL in firebase, and then inserting URL in <iframe> does not display video

I stored a few youtube URLs in Firebase, and I want to insert them in the html like so:
<iframe width="560" height="315" src="{{main.vid}}" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
However, when running the code it only displays a blank. I am using the correct URL when clicking share and then embed on Youtube.
When I replace the Firebase data URL with the normal one like so:
<iframe width="560" height="315" src="https://www.youtube.com/embed/6CulBuMCLg0" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen></iframe>
it works fine. Any help?
It looks like you are using Angular or something similar.
Angular sanitizes URLs before string interpolation for security reasons.
You need to bypass the sanitizer. A possible solution is a custom pipe.

Problems getting index of Iframe playlist

I am not using Iframe's api but simply embedding iframe as follows.
<iframe id="ytplayer" type="text/html" width="640" height="360"
src={`https://www.youtube.com/embed/?listType=playlist&list=PLAYLISTID`}
frameBorder="0" allowFullScreen></iframe>
Is there a way to call the function player.getPlaylistIndex():Number without implementing iframe's api?

How to copy original URL from a iframe?

I have to display multiple site pages on my website.
I would like to display one page from each site on a single page.
I guess it is best to use iframe?
How could a user copy the URL of the original webpage out of the iframe?
Currently I use YouTube embedded iFrame
<iframe width="560" height="315"
src="https://www.youtube.com/embed/8gESFEtIx1A" frameborder="0"
allowfullscreen>
</iframe>

how add my place on google map to my website?

I want to add a location to my website. my business location It is added to google. I want show it on my web page like this. I am using PHP. Google API did not highlight my location like this. How i add the map and highlight it.
link to see my place.
<iframe width="600" height="450" frameborder="0" style="border:0"
src="https://www.google.com/maps/embed/v1/view?zoom=20&center=9.6502435%2C76.3675044&key=************************">
</iframe>
<div id="map-canvas"></div>*
I am using this to show map. It does not highlight my place, is there any way?
Looks to me like you just need to zoom in closer before you create the embedded map. I see your place "highlighted" when I do that:
<iframe src="https://www.google.com/maps/embed?pb=!1m14!1m8!1m3!1d7866.698261635076!2d76.36893404541627!3d9.651179823938902!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x0000000000000000%3A0x93fa22a41aac4d75!2sKanivu+Charitable+Trust!5e0!3m2!1sen!2sin!4v1433709664971" width="600" height="450" frameborder="0" style="border:0"></iframe>
code snippet:
<iframe src="https://www.google.com/maps/embed?pb=!1m14!1m8!1m3!1d7866.698261635076!2d76.36893404541627!3d9.651179823938902!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x0000000000000000%3A0x93fa22a41aac4d75!2sKanivu+Charitable+Trust!5e0!3m2!1sen!2sin!4v1433709664971" width="600" height="450" frameborder="0" style="border:0"></iframe>

Get image from google maps iframe

Can I get image from google maps iframe? Thanks.
For example I have next iframe:
<iframe width="425" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="https://maps.google.com.ua/maps?q=%D0%BD%D0%B8%D0%BA%D0%BE%D0%BB%D0%B0%D0%B5%D0%B2+%D1%83%D0%BA%D1%80%D0%B0%D0%B8%D0%BD%D0%B0&ie=UTF8&hq=&hnear=%D0%9D%D0%B8%D0%BA%D0%BE%D0%BB%D0%B0%D0%B5%D0%B2,+%D0%9D%D0%B8%D0%BA%D0%BE%D0%BB%D0%B0%D0%B5%D0%B2%D1%81%D0%BA%D0%B0%D1%8F+%D0%BE%D0%B1%D0%BB%D0%B0%D1%81%D1%82%D1%8C&gl=ua&t=h&z=10&ll=46.975033,31.994583&output=embed"></iframe>
And I need tage an image of this map. It`s really?
You cannot have access to the content of an iframe of different domain. See jQuery/JavaScript: accessing contents of an iframe.

Categories