Google gives the url itself to embed on websites. you just have to costumize the height and width… go on google map .. enter the location you want and look in the options you’ll find it… I can’t remember which one but it’s fairly easy
Thread Starter
np9000
(@np9000)
Yeah Google is great for having easy snippets. The real issue is I have a snippet from pocket locator. I update my location via my smart phone and in turn pocket locator updates my Google maps link and address text on my site. This link point to a Google map. I want to read that link info every few hours and use it to embed a Google map on the front page of my site.
I would think you can just use the link as is as the source for an iframe. You can use javascript to get the link and set it as the src attribute. You can cause javascript to run on intervals, or run onload and use a meta refresh tag to reload the page.
If you get unwanted content in the iframe, you can use javascript and the Google map API to display your own map and your own marker at the location extracted from the link somehow. I’m assuming the lat/long is embedded in the link somewhere, you just need to extract it using javascript string manipulation functions.
I agree with the people above and there is even an API to further customize the Google Map embed.
Here’s a good reference on this: Embedding Google Maps.
Thread Starter
np9000
(@np9000)
Thanks for all the help I am going to play with this some more. Coding isn’t my strong point but I see between the guide on embedding Google maps and the support for pocket-locators API on there site, how I should use an iframe to make this work.