VR View - Render: Unable to load Texture from image.jpg - google-cardboard

Ive been trying to get a VR View setup on my page following the examples and such at https://developers.google.com/vr/concepts/vrview, the image i'm using is a cardboard camera 'photo' copied from my device, but i've also used a regular jpg version just to be sure.
No matter what i try when the widget loads it only ever shows the error message
Render: Unable to load Texture from image.jpg
I've also noticed a bunch of tutorial or example site having the same issue that i assume they didn't have when they first posted the pages.
Does anyone have a clue why its doing this and how to fix it?

The image that is produced by Cardboard Camera is not in the correct format. VR view requires a equirectangular-panoramic image, and for stereo images, they need to be stacked. See https://developers.google.com/vr/concepts/vrview#supported_formats for Reference.
There is a link to convert Cardboard Camera images to the correct format:
https://storage.googleapis.com/cardboard-camera-converter/index.html
There are also a couple codelabs that walk through using VR view, including converting the image to the correct format:
https://codelabs.developers.google.com/?cat=Virtual+Reality

Primary reason for the error you have mentioned is "CORS". Cross-Origin Resource Sharing.
Your image is not accessible to the calling iframe script. Which is hosted on Google servers.
http://enable-cors.org/
Once you enable CORS, it will work. The reason you have mentioned that it started working once you cloned it locally, is the same. Now the vr script and image are having same origin :)

Related

Facebook playable ads with phaser

I am trying to make Facebook playable ad using Phaser3.60 but the problem is that Facebook block XMLHttpRequest which is used internally in phaser load to load images and sounds.
do do any one know a way to images to phaser without using its loader and without using XMLHttpResquest.
I tried to use imageLoadType: "HTMLImageElement" but it also gives me the same error, I dont know if facebook detect the XMLHttpRequest in the Phaser.min or in the game code.
I'm not sure if this is the solution for your specific problem, but after some tinkering, I learn abit about facebooks playable ads.
Disclaimer: First of all, I was not able the get the zip version to run.(not on the preview Tool and not even on a real campain)
With a single file index.html, with all the data inlined (just under the 2MB limit), I can upload the application and get the same Warning,
BUT after I click the Application (what executes FbPlayableAd.onCTAClick(), as mentioned in the yellow highlighted part), then the Done Button is activated, and I can deploy the ad.
I hope this helps.

mapbox offline custom style -> need png

I have created a custom style, with custom tileset, which displayed correctly in Chrome, but not in Safari or in iOS app (tiles are downloaded for offline).
I am trying to figure out how to specify that I require png tile set and so far came up with nothing.
Can you please point me in the right direction?
Edit: Perhaps it is not png, vs jpeg after all and something else that is not configured correctly, but the guess so far is that it is due to the fact that jpeg is not transparent and thats why custom layer sent as jpeg does not show layer below. Although I am not sure why it is working in Chrome and not in Safari
Your raster tiles are being rendered as expected in Chrome but not Safari, because Chrome supports WebP images.
You can see detailed discussion of the issue here. The linked issue also discusses possible workarounds such as turning the image into an Image source on the map. Unfortunately, there's no easy solution to implement on the Mapbox side because of the limitations of the JPG format and browser support for WebP.

Openstreetcam extract image and gps location

I would like to use python to download the image and sequences of images found in the location on openstreetcam.
http://openstreetcam.com/details/8552/422
I figured out the image is saved under
http://api.openstreetcam.org/files/photo/2016/6/30/lth/8552_2fbf0_57756eba868e9.jpg?v=1518090956232
however there is no official API to use. How would one extract the image and gps data?
Edit: The GPS data can be found in the url by clicking Edit OSM id.
Ideally one would use some sort of web scraper however the .jpg is not found in the website source code.
OSC's endpoints are a little hidden.
Invite you to check out https://github.com/Streets-Data-Collaborative/osc-tools where I've written some scripts to extract track data and the underlying metadata for each track.
Feel free to open an issue on the repo if something's not working.

Why does Google Earth show incorrect images when using google hosted images

Earth often seems to load random images instead of the ones specified in kml. For example load the kml sample from the kml documentation for IconStyle (https://developers.google.com/kml/documentation/kmlreference#iconstyle) It specifies the image at http://maps.google.com/mapfiles/kml/pal3/icon21.png which when viewed in a browser is a building on a green field, but in earth shows up as mountains.
Seems almost as though earth is hard coded to use an internal palette whenever a google hosted image is found and the palettes have gotten out of sync.
(Earth version is 6.2.1.6014 (beta))
I think this is a unfortunate legacy issue.
Google Maps at one point changed around their icons - reusing the same filenames!
Google Earth on the other hand knows that many users where using the specific icons in their Places and KML files. So rather than everybodies icons suddenly changing randomly, they choose to still show the old icons.
Would be funny if it wasn't true!
If you really want to use Google hosted icons, you could use an alternative URL - one that hopefully Google Earth wont attempt to 'fix', eg http://googleapis.com/mapfiles/kml/pal3/icon21.png
But really would not recommend relying on Google Hosted icons. They can change at any point.
If you really don't want to have any problem download the icons you want to use and create a KMZ layer instead of KML. Like that you will be able to have a folder with your images inside and you won't be depending on the hosted ones.

Download images for google chrome extension

i'm trying to build a batch image downloader in chrome. Basically, i will overlay a small download square to each image on the page and user clicks on it to download. Or the user can click to download all images on a page. I'm currently stuck on figuring out how to download the images. The best i can come up with is to use XHR to send the image to another server, the user can then retrieve it there.
If anyone have a solution for me. It would be much appreciated!
Jason
I believe you can XHR the images and using the File API you can store them locally.
Take a look at the following site http://www.html5rocks.com/features/file there are additional resources on the right column that has detailed examples and tutorials. Such as http://www.html5rocks.com/tutorials/file/filesystem/
Mohamed Mansour
This code will do the trick for you: https://gist.github.com/1049553
It's very simple usage of a 'feature' in chrome when you open an image in a new tab.

Resources