I have a problem displaying icons on an OpenLayers map when viewing the map in FireFox and Chrome. To isolate this behavior I created an Openlayers 3 script that displays icons on a map by loading data from a KML file. The script I'm using is based upon this Openlayers example:
http://openlayers.org/en/v3.4.0/examples/kml.html
Modifications to this script include reference my KML source file and the type of map to display.
Icons display properly when the kml icon reference url points to Google like:
<Icon>
<href>http://maps.gstatic.com/mapfiles/ridefinder-images/mm_20_red.png</href>
</Icon>
But when I change the icon reference to the same icon located on my server, the icon is not visible in Chrome or FireFox.
<Icon>
<href>http://www.photoradius.com/data/assets/icons/mm_20_brown.png</href>
</Icon>
In all of my test cases, the icons display as expected in IE.
For reference, here are example files:
1) Icons display as expected in all browsers:
http://photoradius.com/debugol3/kml_google.htm
icon reference in kml file:
http://maps.gstatic.com/mapfiles/ridefinder-images/mm_20_red.png
2) Icons do NOT display in Chrome or FireFox (but do in IE)
http://photoradius.com/debugol3/kml_local.htm
icon reference in kml file:
http://www.photoradius.com/debugol3/icons/mm_20_brown.png
So the only difference in the two examples I've created is the location of the icon. If the icon is located on the Google server, it is plotted in all browsers. If it resides on my server, only IE plots the icons.
Any advice will be welcome.
Regards.
Related
I am trying to export a logo from Adobe Illustrator to SVG for the Web. I followed the steps and properly exported the SVG file. Loaded it and published the page. It looks fine on my Development PC; however, when I tried to view the same page on another PC, some of the fonts have changed and does not display properly. How do I make sure the fonts are available in the SVG file for publication and display everywhere?
Shift+Ctrl+O
The less fonts the less problems.
I would like to replace this animation (i.e. the animated pacman image displayed on initial page load).. but where should I be looking ?
The "pacman" loading icon is configured in src/main/webapp/content/css/loading.css
The HTML that loading.css applies to is in src/main/webapp/index.html
The documentation says you can't reference SVG from markdown, but I didn't see anything saying I couldn't use it for toolbar icons. I've done just that, and an icon that works perfectly in the extension host is missing when I package and install from a VSIX.
Is SVG also disallowed for toolbar icons within an extension? If I must render bitmaps, in what format and at what resolutions? Is there detailed guidance on this that I have failed to read?
SVG is supported.
Files in project-root/src are not bundled. Put the icons anywhere other than the src folder and they will be bundled. (I certainly snatched defeat from the jaws of victory with that one!)
I created a new pinned-tab icon for Safari 9 on El Capitan as documented by Apple here but I can't seem to get Safari to actually show it when I pin my tab.
Here's the line in my header:
<link rel="mask-icon" href="https://towatchlist.com/img/twl.svg" color="red">
Safari does show the image just fine when I follow the link to the SVG file, but the pinned tab icon still shows the auto-generated letter image even after reloads and pin/unpin etc.
I tried opening up GitHub's SVG (which is working) and copying the general markup there but that didn't fix things either. I also poked through the Safari console briefly but didn't see it even attempting to land the SVG file.
Any suggestions on how to even debug this or ideas on what is going wrong?
Looks like Safari is aggressively caching (even the absence of) these icons. Found the answer over on Super User:
Delete the contents of the following folder:
~/Library/Safari/Template Icons
And then restart Safari.
Is there a way to get an overlay of some kind to open in GE when the user loads my kml?
I want to add a splash screen with a disclaimer on it and i want to be sure each user sees it.
The overlay would appear as the kml is opened in GE and they would click to dismiss it.
Is this possible?
Try using CDATA for the description of the top-level object in your KML file (eg Doc or Folder). This will pop up as a balloon when user adds KML file to Google Earth.
If you're working with NetworkLinks, you could add the overlay when the NetworkLink first loads, then set refresh to occur a short time later (eg 5 seconds) which returns an Update with a to remove the Overlay.