Google street view image exact location - google-street-view

Google street view API allows you to request the street view image from a certain location, viewpoint and direction the response is the image only. Yet, if the location does not have an image it sometimes returns the closest image existing but does not update you as to where the image was taken from
Example:
The image received from the location (32.78554181114093, 35.01731804123101) is actually taken from (32.7855604,35.0176555).
I wish to receive also the true location at which the image was taken.

Related

Low resolution Email Preview in Salesforce for marketing cloud connect emails

Question about Marketing Cloud Connect - In case of Individual Email Result in Salesforce, an email preview is sent from MC to SF object along with a thumbnail preview of the email template (as base64 encoded image). This thumbnail has two problems.
a. isn’t clear enough for the sales agent to see what was sent to customer
b. can’t find what offer percentage was given to customer as the preview has ampscript value instead of actual value.
There is no way to change the default configs of MCC to increase the thumbnail size. To solve this and improve the image resolution, I’ve thought of below solutions. Is there any other possible way that you’ve done?
From customer send log, take ‘view_email_url’ and get the html using a visual force page and remove all the ‘https://click…xx.com/’ links to ensure click/ open counts aren’t impacted. Downside - # of api calls to make are higher
For every email, create a jpg preview of the email template and store it in MC and store this in SF in a custom object as ‘EmailName vs EmailPreviewUrl’. And, whenever a marketer creates a new email, they have to ensure that they create a jpg copy in MC and update associated record in Saleforce custom object. Downside - sales agent will not know what % of offer is given to customer (ps - % of offer is decided in MC automation based on raw order information we’ve about this customer). To manage this downside, we can send the offer details of each customer to SF using updateSingleSalesforceObject method everytime an email is sent. To do this, all the campaigns should be standardized to some extend.
Any other thoughts? is there any configs that I can flip to increase the image size?
To answer this question, we ended up creating a cloudpage code resource (similar to API) that returns the complete HTML of 'view_email_url' (aka view as web page) for a given email + Subscriber + datesent + BU. We used SSJS to query sendLog DE using these inputs to figure out the view_email_url value. To avoid counting view_email_url opens to tracking opens, we wrapped the open counter pixel inside a context variable - something like below.
%%[
IF _messagecontext != 'VAWP' THEN
]%%
<custom name="opencounter" type="tracking" />
%%[ ENDIF ]%%

Store timestamp from vimeo

I currently have an iframe on my site with a vimeo player.
What I need is: the moment the user pauses the video or closes, store the timestamp so that in another when the user returns to the video, it returns at the point of the stored timestamp. Like Netflix video player.
It's possible?
Accessing the timestamp is possible with Vimeo's Player Api. Making use of the timeupdate listener, the current playback position can be saved. As for how the timestamp is saved, there are many different options (you could store the data client side, server side, in a db, etc...). Then when a user returns to the page you could check if a timestamp exists and set the video's playback position accordingly with setCurrentTime()

How can I center google map based on user location (but not on html5 geolocalization)? (angularJS)

I'm following this tutorial and in the last step of this part the author shows a piece of code:
// Get User's actual coordinates based on HTML5 at window load
geolocation.getLocation().then(function(data){
// Set the latitude and longitude equal to the HTML5 coordinates
coords = {lat:data.coords.latitude, long:data.coords.longitude};
// Display coordinates in location textboxes rounded to three decimal points
$scope.formData.longitude = parseFloat(coords.long).toFixed(3);
$scope.formData.latitude = parseFloat(coords.lat).toFixed(3);
// Display message confirming that the coordinates verified.
$scope.formData.htmlverified = "Yep (Thanks for giving us real data!)";
gservice.refresh($scope.formData.latitude, $scope.formData.longitude);
});
When I run his app (which you can check out here) browser asks me if I agree to share my location and - if I do - the map centers and focuses on my real position. But when I deny, the map shows me the center of America (I'm from Europe).
So my question is: Is there a way of centering the map near the users location in case he denies using the real GPS data? For example based on his IP address or host? In that case I don't need an exact location, but e.g. city or country would be nice to have.
If the user denies location in the browser, you don't get anything. There is no "general location" fallback. IP may be the only option for any kind of resolution at that point. I did not see anything in user agent that would provide location. When creating a Google map, you can specify default center for the map at instantiation, which in the tutorial he must have done for America.
EDIT
Using IP, you should be able to find a service that would resolve the IP to a physical region like this:
IP to Location
Then you can send that location to the Google Maps geocoder to get a point you can center the map to like this:
Google Maps Geocoding example

Save image data to a database

I need to make an app into which we can load pics or a folder containing pics. The pics should load into a kind of list which shows the pic according to the selected item. I should be able to rate the image from 1 to 10 and add a description to it.
Finally the app should be able to save both these data to file or database which loads the rating and description on next startup.

How to get Google Glass location change notification inside my Glassware

Could you please guide me how doing this. I have to get used location changes and have to send some information depend on that location.
See https://developers.google.com/glass/location and https://developers.google.com/glass/v1/reference/locations for complete information about using Locations with Google Glass.
Keep in mind that you need to request the additional scope https://www.googleapis.com/auth/glass.location in order to get any location information.
Once you have done this, Glass will attach the most recently known location (usually where you have been sometime in the past 10 minutes) to any timeline items reported to you.
At any time you can get a list of location updates available, or the "latest" location available from Glass. Additionally, you can subscribe to the "locations" collection (see https://developers.google.com/glass/v1/reference/subscriptions) and you will receive a location change notice roughly every 10 minutes which includes an ID to fetch the associated location.
We can insert subscription for location changes when a user subscribes our Glassware application. After that mirror API will notifies location changes to given url.
Like this
//create a Subscription for location changes
Subscription subscriptionLocation = new Subscription()
{
Collection = "locations",
UserToken = userId,
CallbackUrl = Url.Action("Notify", "Notify", null, Request.Url.Scheme)
};
//insert a Subscription
mirrorService.Subscriptions.Insert(subscriptionLocation).Fetch();

Resources