Placemark kml info not showing in iOS version of Google Earth - ios

The information for placemarks that I have created in a kml file does
not show on the iPad. The window opens up, but there is no content. It
has worked in the past and it works fine in Google Earth for Windows
and Android. I have a feeling that this might be an issue with Google
Earth on the iPad more than a kml issue.
Here is the file if anybody is interested in taking a look:
http://dl.dropbox.com/u/18240150/GoogleEarthAirports30Apr12.kml
Thanks

Your KML looks good (actually, it's very nicely done; the airports look and behave great):
Visual desk check in a text editor and it looks good
Loaded in Google Earth without problems (confirms the behavior you saw)
Also there is an Interactive KML Parser available online - your KML ran through the parse without errors
Your suspicion that the root cause of your problem lies with the iPad or Google Earth on the iPad appears to be correct. I don't have an iPad, so I can't test that, but knowing that an independent test had similar results at least helps to pinpoint the problem.

Here is a work around for this problem.
Prepare a KML file with NetworkLink tag referring to your remote KML file and download the file.
Then description rendering works well even on iOS5.
"Remote", which means a file places at a server like "http://example.com/sample.kml", is important. Local files like a file in a .kmz file don't work currently.

Related

Webpack url-loader PDF data URI link for Vue site stops working in iOS 14

I have a Vue.js website with a PDF file which is included in my ultimate javascript bundle via webpack. (It's my CV.) The following build and delivery process has worked perfectly fine for me since 2017, but suddenly stopped working in iOS 14:
Build the PDF with LaTeX.
Use webpack's url-loader to include the PDF in my webpack bundle as a base64 data URI.
Load that URL into a vuex data store, and then just deliver it as a link when clicked.
For the last three years, this has worked fine: I've been able to click on the link and get a working PDF. It's been kind of random and platform-specific whether the PDF opens in-browser or shows up in a download folder, and whether it gets the filename I've asked it to get or not, but, well, that doesn't matter to me. And the core functionality of click the link and get the PDF has worked on every browser and every platform I've ever tried it on.
All of a sudden, with iOS 14, it's stopped working. Now, when I try to activate the PDF link in iOS Safari, nothing happens at all. When I do it in iOS Chrome, it produces a little popup claiming it downloaded a document, but nothing seems to actually be able to open the document. And when I do it in iOS DuckDuckGo, it just displays the base64 data URI in the address bar.
Interestingly, if I take the dataURI that DDG displays in the address bar and copy and paste it into Safari or Chrome on iOS, it actually displays my pdf. So the browsers still have the capacity to display a PDF from a data URI. It just doesn't want to do so from my link.
And my site still works as expected on the desktop. Including in Safari on the desktop. Also, it still works on my wife's phone (she's still on iOS 13). So this is clearly something Apple changed in iOS 14. But what? And how to get my site working again?
I'm guessing that Apple has changed the behavior of the renderer in iOS in some fashion to cause it to break across browsers but nowhere else (since browsers in iOS are all still required to rely on webkit, right?)
This is a pretty important feature to me. I made this decision deliberately for perceived performance---combined with pre-rendering, everything on my site, including the PDF, loads very close to instantly from the user perspective. So I'd really like to keep it.
I'm using Webpack 2.6.1 and Vue 2.3.3. This is a stable build that has been working flawlessly for three years, so I haven't felt the need to update anything except for security updates.
After searching around, I did find this Apple dev discussion which suggests that in iOS 14, Apple newly blocks redirects to data URIs. But I'm not doing a redirect, I'm actually navigating directly to the URI through a link. And the linked discussion suggests that the newly banned behavior just brings Apple in line with what other browsers already ban---but my code works in every other browser, so that can't be it.
Relevant code, to the extent it matters (though it's so basic and obvious that I doubt a simple code fix will be the answer here):
from my webpack.base.js:
{
test: /\.(pdf)$/,
loader: 'url-loader'
},
from my vuex store, in state.js
import cvURL from './assets/pdf/gowdercv.pdf';
from the component containing the link that points to PDF:
<p><a :href="cvURL" download="gowdercv.pdf"><img src="../../assets/icons/file-pdf.svg" class="cvicon"> Download in PDF</a></p>
which is loaded as a computed property to the component, i.e.,
computed: {
cvURL: function(){return this.$store.state.cvURL;},
Does anyone know how to get functionality back in iOS? Is there a workaround built in recent versions of webpack or vue for this? Thanks!
Update: after some help off SO, an acquaintance turned up this similar problem, which also came up with a solution: turning the base64 URI into a blob and passing that data url. Which also solves my problem. Though that SO doesn't have an accepted answer, so I can't vote to close my own question as a duplicate, alas.

Mapbox GL JS : Live geoJSON overlay

I am working on a weather app in Mapbox and trying to get geoJSON files to update tornado warning polygons live on the map. (This would be done by a file called "warnings.geojson" in the same path as the html file and re-written frequently by a back end c++ app). Anyway, I found the following example on how to update live JSON files :
https://www.mapbox.com/mapbox-gl-js/example/live-geojson/
This works for what it is designed to do (and I understand what it is doing - it is what I am looking for), but I cannot seem to replace the code with my own. I would like to have it update the following test polygon file instead.
https://manidoo.000webhostapp.com/test.geoJSON
The above code is just a polygon of the Bermuda triangle. (Once I get this working, I can modify it on my own) I have tried so many variations of code that listing them here would just be a huge mess. Surely it should very simple and I am just missing it?
I believe what I should be changing is the map.addLayer() function, but I am not sure what to do. Any help would be so greatly appreciated.
The correct answer to my own question was testing the app in the wrong browser. Edge will not show geoJSON polygons that are on a local directory (atleast in this specific scenario). As MeltedPenguin pointed out - the JSON was valid. Once I uploaded my HTML and geoJSON to a server online with a http:// prefix, it worked great. Firefox showed the polygon even in offline mode.

Skobbler not picking up content from meta-folder in PreinstalledMaps (iOS)

I am trying to make an offline application with a bundled map. The map is running in SKConnectivityMode.Offline, so I have put the map data in: SKMaps.Bundle/PreinstalledMaps/v1/20150413/package
I have also copied the metadata into:
SKMaps.Bundle/PreinstalledMaps/v1/20150413/meta
The problem is that the data in the meta-folder is not picked up, and the map does not render. I tried to copy the meta-folder into the Library/Caches-location of a Simulator app, and then the map renders as expected.
A workaround I had in mind was to copy the meta-folder into the Library/Caches-area when the application is started the first time - but it will lead to double storage of files, and seems a bit dirty.
Any ideas what I might be doing wrong?
The version of the Skobbler API is 2.5.
I found a solution to the problem, with help from the API developers. The SKMaps.bundle was for some reason not being replaced in the application package by the build script, and I needed to run a Product->Clean from XCode.

How to display a .pdf on BrowserField in Blackberry 7

I'm trying to display a .pdf file on a browserfield but somehow it's not opening in my app however it works fine with .txt files.
I'm reading .pdf file from local storage and using
browser_field.displayContent(fileinbytes, "application/pdf", "");
but it's displaying a player like image on the screen and not actual result.
If anyone has any idea about the same, i'm all ears.
As far as I can tell this isn't possible (browserfield doesn't even fully support javascript).
This post suggests that you can view it via Google, which wouldn't be from local storage.
(Un)luckily blackberry is very similar to Java ME, so you can often use those libraries as is. Apparently JPedal can render pdf files for J2ME, and might be worth a look.
Other than that, I don't think you'll have much hope. Good luck

Embedded Youtube videos not appearing in infowindows

I am attempting to embed Youtube videos into some of the infowindows in the following KML file:
http://www.jonangfoundation.org/files/newdef.kml .
The videos show up fine on Google Earth and KML Builder, but on this page they do not show up at all:
http://www.jonangfoundation.org/taktentest
Anyone know what could be keeping them from showing up?
Unfortunately your 'test' page does not load - Page Not Found error.
However, I think you need to set the correct MIME type for .kml files. Your newdef.kml is presented in my browser window as XML rather than downloaded as a .kml file. That might be your problem, it is hard to tell with nothing else to go on. check out this link for details about setting the right MIME
https://developers.google.com/kml/documentation/kml_tut#kml_server
Edit: I am not sure what is going on. Your KML code looks okay to me, and I see you have tried a few different approaches, none of which appear to work. I suggest you visit this SO question, as it's answer is something you could do to make it work.
Basically, you override the default behaviour when a placemark gets clicked, and allow iframes and javascript to be used in the balloon. It is the original way of getting around your problem (however I thought it was fixed in recent version of the plug-in. Maybe not?)
I believe your content is being scrubbed. See link for description and possible work around.
https://developers.google.com/earth/documentation/balloons#scrubbing

Resources