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

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.

Related

how to solve website speed test delay

So I have this wordpress blog set up on a VPS with litespeed and cloudflare. The website loads some banners from a revive insallation on the same VPS server, only that domain doesn't have cloudflare installed.
Although the page speed and wslow scores are good, I still get a 3 to 5 secs page load. You can see the results here:
https://gtmetrix.com/reports/www.survivalsullivan.com/WIZjVt68
Although individual resources seem to load fast (including the revive banners), there seem to be inexplicable "delays" in the waterfall... I'm no wiz in website optimization but do have some experience.
Am I missing something? I couldn't find a decent resource on how to read the waterfall, although I figured out most of it. Thanks!
Overall you got pretty good results!
First of all deal with all those images gtmetrix displays: optimize them using photoshop, jpeg mini or sprites.
If you haven't already, install bj lazy load plugin and above the fold.
Install and configure W3C cache which will fix the YSLOW settings that still not green in gtmetrix.
I assume you use some kind of theme / page builder? see if you can reduce the number of dom elements in page. Use DOM Monster! to see how nested is your page.
For example if need to display an image dont nest it in div inside column inside row inside container div.
If your website is gonna be used by users in multiple countries I would suggest paying for MAXCDN. It also integrated into W3C cache plugin.
If you use google fonts try adding them locally to style instead of GETing them.

Load locally stored images through css with inspect element

I'm trying to redesign a small portion of vastly huge site and I was told that I can load custom images to Inspect Element (Chrome) if they are located in the same path as the stylesheet to which the site is remapped. (all done through css via 'content: url('...');') but the webpage is still looking for them in its own resources. So is there a way to use a locally stored image with Inspect Element?
When you're passing images in locally you can use, for example:
file:///C:/Users/[username]/Desktop/picture.png
So if I was to change a background image I would use
background-image:url("file:///C:/Users/Julia/Desktop/background.png");
But note that a lot of sites don't allow you to load local resources, so an error may appear in the inspect console when you try.
Actually, it only works with background instead of background-image (not sure if it works) but background without image seems to work. So put in:
file:///Users/[YourName]/Documents/picture.png
Like this:
background:url("file:///Users/[YourName]/Documents/picture.png")
I just decided to contribute because I just wanted to try it out myself as well and found this as the first answer despite the post being 2-3 yrs old; although for other users it might be helpful.
Also, this was done on Opera, but haven't tried it on other browsers, but it does work for me. Don't include the drive name. But you can simply copy the URL, by dragging the image into the browser (if it loads it) and copy the link. It should work (usually older browsers that don't auto-download the image).

Google Earth/KML placemark balloon with a link that can play the tour it is contained within

I am working with Google Earth (not plugin) and would like to find out if there is a way to Play a tour that is already loaded in the TOC from a placemark's balloon. This placemark is actually part of the kmz that also contains the tour. Is there a way to reference the Tour by Id and tell Google Earth to play it? Thinking something like < a href=GE.Play(tourID) >.
Any suggestion?
The auto-tour capability in KML had been requested as far back as 2009.
http://code.google.com/p/kml-samples/issues/detail?id=248
Likewise, this has been discussed in the Google Earth and KML forums:
https://groups.google.com/forum/?fromgroups=#!topic/kml-support-advanced/j_DQhNwNR7E
This is not yet directly supported in raw KML and Google Earth client. Using the Google Earth API you could automatically play a tour but it would be nice to do this directly with KML and Google Earth.
Google supports KML extensions through the gx: namespace. Maybe if enough users ask for this feature it can be added to a future release of Google Earth.

Pass google earth a secure KML file

Is it possible to pass a secure KML file to Google Earth?
This KML file will require either a token or authentication of some sort.
(I'll adapt the solution based on the possible methods of securing the KML file that are acceptable.)
We need to display some secure information on a google map, and yes we are an enterprise customer. (If that helps.)
That alternative is to plot the points using the google API, but that require's slightly more effort.
If your intention is just to protect the Kml from unauthorized access, you can use the following approach. I tried this approach in one of the scenarios and it worked for me.
http://keelypavan.blogspot.com/2011/07/protect-kml-kmz-files-from-unauthorized.html
Just some information..
If you pay Google you can have your website run via HTTPS.
If you want something that's a bit more powerful to play with, you might want to try something like GeoServer with an OpenLayers frontend. It can serve your data dynamically from a postgres database as kml (or kmz, gif, jpeg, png, svg, and even pdf) out of the box. You don't have to code a single line to get that done, and it's free.
And indeed, you could draw stuff yourself by using the Google Maps API, but if your page is HTTPS, your users will get a warning about Google's javascript files.
Furthermore, if your browser sucks (at rendering maps), Google does the actual rendering for you server-side, and for that, the actual data will be sent to Google, and a rendered overlay image will be sent back. Maybe you can disable that behaviour, but at least you should be aware of that if you're concerned about security.
As KML files are loaded by Google servers, you can restrict access to KML file only for Google servers.

Google Earth Questions: Making Outside Pages Appear in Google Earth and A Button That Follows

Good morning, eveyrone
I'm working on an application using Google Earth and I had two questions.
The first question involves the pop up window. I want to get an external website to appear in this bubble. I can either hardcode the website into the description of the placemark or use an iFrame. Are there any other options I can use to get a website into Google Earth?
Second question: I want to ensure that the user, at all times while using my kml, has access to certain buttons. Is there a way without querying web application every few seconds to ensure that the button remains available to the user?
Thank you for your time.
The answer to you first question is no - other than loading the html directly or using an IFRAME there is no way to display markup in the content balloons.
I am not sure what you mean in you second question, are you developing a web-based application using the Google Earth Plugin - or a kml layer for use in the google earth application. Either way you should not have to query anything to make sure a button is visible.

Resources