Embedding a link to google map in the email - google-maps

In my meeting management application, I am trying to send the meeting location information via mail and in the mail content I would like to place a link to to the google map site, so that the meeting place could be seen on the map.
What would be the best way to construct the google map url string (eg. http://maps.google.com/maps?q=address) , for a particular address.
Thanks

Reducing the clutter of arguments to a minimum, this seems to work pretty well:
http://maps.google.com/maps?q=1+infinite+loop,+cupertino,+CA

Related

Google Places API Reviews Widget

I'm trying to embed Google's "write a review" widget into my website. Much like what Podium.com does.
They host a page and load an iframe with the src:
https://www.google.com/maps/api/js/ReviewsService.LoadWriteWidget?key=THEIR_API_KEY&pb=!2m1!1sChIJ6VFjYpqa9YgREIJTX-XLyoE!3shttps%3A%2F%2Ftheir-url.com!5sen&cb=37369878
This renders the widget like so:
I dug into their html source and it appears they're using the Google Places Reviews Widget. I searched Google and Google Developers for "Google Places Reviews Widget" which returns results:
However, the links go to a 404 page:
https://developers.google.com/places/reviews/reference
https://developers.google.com/places/reviews/widgets
I've replicated what Podium is doing on my own page using my API key. However, the widget doesn't display. I don't get any errors, the iframe loads some scripts and some hidden html elements, but doesn't render the full widget.
Is this an API or feature that I'm unable to access? Has anyone implemented something similar?
I also had the exact same experience and reached out to Google about it.
Here's their preliminary reply on Sept 4, 2018
Apologies for the delay on this.
May I ask if you followed the steps here:
https://developers.google.com/places/reviews/#api-key
It says there that, "Before you begin coding, notify your Google
contact person that you intend to create a project to use the Google
Places API Reviews Widget. Indicate the email address of the Google
account you intend to use to manage the project. Google will use this
email address to allow you to activate the API for your project.
After your Google contact person has confirmed that your email address
can activate the Google Places API Reviews Widget, you can follow the
instructions here:
https://developers.google.com/places/reviews/#api-key to activate the
API and create your key.
May I ask if you have a contact person? If you don't have one,
apologies but the Review's Widget is not generally available, because
it needs some special authorization before it can be used. Please note
that we are investigating to see if you can get access to that Widget.
If you do have a contact person, please let me know.
Moving forward, may I ask what kind of places would you like to use
the Reviews Widget for?
Then this:
With regards to your intention in using the Review Widget, I would
like you to know that unfortunately, the Review Widget is not
available at the moment yet. We don have a date for expected general
availability for this product but I can get back to you and inform you
once the Review widget is already available publicly. Once again,
apologies for this inconvenience.
And finally:
The Reviews Widget is only actually limited to trusted partners as of
the moment. Moreover, the Review Widget team isn't looking for new
testers at the moment:
With that said, the public documentation on the Reviews Widget has
already been set into private. As mentioned, the Reviews Widget is not
yet available for the general public.
Sorry to be the bearer of bad news...
check this out... I dunno if this helps. i've been trying to figure this out too. A company called BirdEye has this Review Portal that opens the post-review widget on the page. I inspected the code and found that there are 2 JS scripts calling on Google's Places API (image attached). The button code I'm assuming hitting these scripts is just below. Does this make sense to anyone? I'm not able to get into the actual JS file though.
<button class="btnReviewSite2" data-source-url="https://www.google.com/search?q=Innovative+Roofing&ludocid=8385655751686277266&gws_rd=cr&fpstate=lie&lrd=0x87938c4de368e6b3:0x745fd57a1ff8c892,2#trex=m_t:lcl_akp,rc_f:nav,rc_ludocids:8385655751686277266" data-place-id="ChIJs-Zo402Mk4cRksj4H3rVX3Q" data-google-embedded="1" data-source-url_9="" data-source-id="2">
<span class="aggr-source-wrapper">
<span class="rev-site-2 presenceIcon aggr-source-2 aggr-dummy-source-g">
</span>
</span>
<span title="Review us on Google">
</span>
</button>
Google Places API JS Script

Instagram, get JSON feed for cetain hashtag without using API

I am creating a personal app and I am having some trouble. I have tried using the Instagram API to get a JSON feed of images by hashtag (any image insta, not just images on my profile).
My issue with the API is that i cannot seem to search public images without having my app in live mode. i keep getting a 400 unauthorized access_token error, even though i do have a valid access token.
I cannot put my app in live mode because insta require a privacy policy url and a company name and I am not a company. I am an independent dev making a personal app.
Whilst searching through stack overflow i cam across this url:
https://www.instagram.com/bikerpicgirl/media/
This allows me to get images by user without the API. I am wondering if anyone knows a similar url where i can get a feed like this but for hashtags instead of users.
I could just make a scraper that mimics the search process but this seems way to overkill and is alot of effort for something that should be so simple.
Yes, you can explore Instagram media by hashtags with this url format:
/explore/tags/your-tag/
for example if hashtag is #amsterdam your url would look something like this:
https://www.instagram.com/explore/tags/amsterdam/
As Jon Goodwin mentioned in the comment this example link is subject to change and may not work in the future.

How can I send a Google Maps by email?

In my angular webapp I store the lat and lon of a position.
I need to send an email to a user with some information including a Google Maps with a mark in (lat, lon) and some style for the maps like the zoom.
How can I include a Google Maps in my email with a mark?
Thanks
In my previous project I had a similar requirement.
I made use of the google maps static API, which returns an IMG by request.
Static API Doc´s
Now you have to decide if you wish to save the IMG to the filesystem and send it then via email, or if you just the IMG string and use this for your email.
If you wish to do it without saving the IMG to the filesystem take a look here:
Embed Image in Mail
Otherwise it would be a normal email, how to do that is pretty good explained the Doc´s.
Good Luck!

Google maps display customer data in balloons without disclosing it (publicly or to Google)?

I'm trying to create a map of customer locations using Google maps.
It would be very convenient to display customer information in the balloons that pop up when you click a marker. However, some of that data should not be public, and the company would rather not disclose it to Google either.
I have access to (and can set up a server if need be) that runs something server side to generate .kml, Javascript, or serve a web page (including the js in that).
I've thought of a few ways to go about this. First is embedding html in .kml and having the contents of the balloon replaced by JavaScript making an asynchronous request to a private url/server. Unfortunately, it looks like JavaScript is stripped out if you are loading a .kml file by just putting the URL of the .kml file in the search box of google maps. I also found that it seems that iframes are also stripped out. One thing I do not know is if I set up a xhtml page that uses the Google maps API if that would let me load data from a private server directly to the browser without that data being loaded through Google.
One option that appears it will work is just putting a link in the .kml html for the balloon and having that link go somewhere. But that makes a whole extra step to see what the marker is, and diminishes the value of the whole thing in the first place.
So, is there a way to do what I'm attempting to do (load private data into the placemark bubbles directly to the user's browser instead of through Google)? If so, which option is the most maintainable/clean?
With Google's map API, you can write an (x)html page that loads a google map using javascript.
You can then have that javascript load data from a server directly to the browser (in something like JSON or XML) where the javascript can parse it and then add each point to the map. That way, the data does not route through Google's servers.

Is it allowed to cache static google maps?

I'm having some issue with static Google maps generation. The API has "a query limit of 1000 unique (different) image requests per viewer per day. Since this restriction is a quota per viewer, most developers should not need to worry about exceeding their quota".
However when using a shared connection, as instance with a mobile phone and a 3G access (phone operators), this limit seems to be problematic.
Hence my question is the following: can I retrieve the image server-side and serve it to my clients? Is it allowed?
This FAQ indicates not: Can I generate a map image using the Google Static Maps API which I store and serve from my website?
Text (as of November 2016):
Can I generate a map image using the Google Static Maps API which I store and serve from my website?
You may not store and serve copies of images generated using the Google Static Maps API from your website. All web pages that require static images must link the src attribute of an HTML img tag or the CSS background-image attribute of an HTML div tag directly to the Google Static Maps API so that all map images are displayed within the HTML content of the web page and served directly to end users by Google.
Actually, you can. Reference the Google Maps TOS:
3.2.4 Restrictions Against Misusing the Services.
(a) No Scraping. Customer will not extract, export, or scrape Google Maps Content for use outside the Services. For example, Customer will not:(i) pre-fetch, cache, index, or store Google Maps Content for more than 30 days; (ii) bulk download geocodes; or (iii) copy business names, addresses, or user reviews.
(Edit: Updated to reflect the latest terms as of June 2018.)
This is discussed in further detail in the "Sanity Checks" aspect of Google Static Maps Usage Limits.
As of Oct 21 2021, both ToS and FAQ are speaking the same language. Storing and serving copies of images generated using the Google Static Maps API from your website is not allowed.
ToS
3.2.3 Restrictions Against Misusing the Services.
(a) No Scraping. Customer will not export, extract, or otherwise scrape Google Maps Content for use outside the Services. For example, Customer will not: (i) pre-fetch, index, store, reshare, or rehost Google Maps Content outside the services; (ii) bulk download Google Maps tiles, Street View images, geocodes, directions, distance matrix results, roads information, places information, elevation values, and time zone details; (iii) copy and save business names, addresses, or user reviews; or (iv) use Google Maps Content with text-to-speech services.
FAQ
Can I generate a map image using the Maps Static API which I store and serve from my website?
You may not store and serve copies of images generated using the Maps Static API from your website. All web pages that require static images must link the src attribute of an HTML img tag or the CSS background-image attribute of an HTML div tag directly to the Maps Static API so that all map images are displayed within the HTML content of the web page and served directly to end users by Google.
I find the TOS pretty contradictory
Can I generate a map image using the Google Static Maps API which I store and serve from my website?
You may not store and serve copies of images generated using the
Google Static Maps API from your website. All web pages that require
static map images must link the src attribute of an HTML img tag or
the CSS background-image attribute of an HTML div tag directly to the
Google Static Maps API so that all map images are displayed within the
HTML content of the web page and served directly to end users by
Google.
https://developers.google.com/maps/faq?csw=1#usagelimits