mapbox offline custom style -> need png - styles

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.

Related

Disabling Image Magnifier

I am creating a Chrome extension that works with images. The problem that I have is that when an image is larger than the screen, Chrome automatically resizes the image to fit the screen and it turns the cursor into a "magnifying glass" that zooms the image in/out when the user clicks on the image.
For my application, this behavior actually stands in the way of what I am trying to do, and I am wondering if anyone knows how to disable this image magnifier (such that the user can click on the image without the image changing size on the screen).
I searched the entire stackoverflow for "chrome image magnifier" but there is only one relevant posting
Code to disable magnifier, set wallpaper, and save image in Google Chrome?
which says that the magnifier comes (and can be disabled) in the Chrome ToolBox, which is not even available for download anymore
https://chrome.google.com/webstore/detail/chrome-toolbox-by-google/fjccknnhdnkbanjilpjddjhmkghmachn?hl=en
So I believe this image magnifier is now an inherent part of the Chrome browser, but I would still like to disable it in my extension.
Thanks

What kinds of icons do Chrome Extensions support?

Trying to make a Firefox WebExtension work in Chrome, I realized that Chrome's icon support must differ. I have been using a multiresolution icon that contains the icon in 16x16, 32x32, 48x48, 64x64, 128x128 and 256x256, which seemed to work in Firefox without any errors. In Chrome I get errors that the icon is not supported...
Is it possible that my format is corrupt or does Chrome simply not support multiresolution icons?
Do I really have to create individual files for every resolution?

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

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 :)

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.

PNG image won't show in IE7 or Firefox but works in Opera

I got a webservice which creates a PNG-file and returns a link to it.
Then this graphic is used by a website (ASP.NET).
IE7 & Firefox 3 can't show this image but in Opera 9.5 it works fine.
Did anyone run across the same problem before?
Edit:
Content-type is set to image/png.
The image is created with the library from a 3rd party vendor which is not available to the public.
Any chance to check the png-file for compliance to the standard?
In principle, both IE7 and FF can display PNG images. As it seems your PNG is not fully compliant to the rendering engines of these browsers (or to the standard?).
It is hard to tell where the problem lies exactly without knowing how the image was created. Which lib are you using? Do you have sample code?
EDIT (After reading the comment by Yuval A):
You could also check whether the HTTP response sent by your web server has the correct content type set for PNG images. This might be needed by browsers to display the image correctly.
Check how your web service is "returning the link" to it.
Is it represented correctly on the HTML response? (i.e. in an IMG tag with a correct src?)
Turns out that the png wasn't rendered with the right dpi settings. A subtle bug that emerged after some months.

Resources