What is the best way to create kmz files for offline use?
I need files that I can
put on a CD and a salesman can pull up all Google Earth data - map, placemarks, balloons, text and photos with no Internet connection.
You can have any level of nested KML or KMZ files within a KMZ file.
The KMZ file can display embedded images inline in popup balloons and link from one placemark to another. You can also display some content such as HTML files inline via an iframe in a balloon description.
Here is KML description snippet to display an inline image and external HTML (via iframe) from files embedded inside the KMZ file.
<description>
<![CDATA[
Here is an image:<BR>
<img src="image.gif"/>
<BR>
Here is html:
<BR>
<iframe src="test.html">
<p>Your browser does not support iframes.</p>
</iframe>
]]>
</description>
Here are some restrictions for <iframe> content in the KMZ Tutorial
The <src> element within an <iframe> element cannot point to a local
file on disk, nor can it point to a file inside a KMZ file; it must
point to a URL on the Internet that a browser can visit.
If you want to link to non-KML documents (e.g. HTML, PDF, etc.) then embedding them inside a KMZ file has some further restrictions. Directly linking to local files (HTML, PDF, images, etc.) doesn't work from Google Earth if those files are inside the KMZ file.
If your target is an offline CD or DVD (no internet connection) then you can as easily create KML files with the media content in sub-folders (e.g. video, images, html, etc.). To link to non-KML files the user of that KML in Google Earth would need to enable the "Allow access to local files and personal data" option in Tools/Option/General menu panel then you'd be able to access those links as you would from a web browser.
The structure and layout of the CD/DVD and KML/KMZ files depends on several things: 1) the amount of data you want to make available and whether it fits on a CD or DVD in compressed or uncompressed form, and 2) whether you just want to display the content just within a KML description balloon or want to link to the content in a full-browser window. You may have a mix content -- some of which are to be displayed only inside the KML balloon descriptions in which case it could placed be inside a KMZ file if compression is needed and other content that needs to be linked and accessed externally.
Related
I have a large website with several consistent text, like the nav, contact, footer, etc. I was wondering how I could keep all of these consistent on my static website (hosted on github pages) by loading the code from another file or any other method, since currently I have to manually update everything and it takes a while.
Github pages uses Jekyll as the underlying static site generator. You can break down your site into multiple smaller html pages that can be included into a main layout.
https://jekyllrb.com/docs/includes/
The include tag allows you to include the content from another file
stored in the _includes folder:
{% include footer.html %}
Jekyll will look for the referenced file (in this case, footer.html)
in the _includes directory at the root of your source directory and
insert its contents.
Read the documentation on this and you can easily find repeated text/html and replace them with includes.
If you're not already, this site has instructions so you can run jekyll locally to verify changes before pushing the changes to Github.
As I am new to dotCMS, just wondering is it support any script through which I can upload/publish my multiple contents(i.e well structured directory) as whole. For example I have multiple text files with contents to publish how can i do this in one shot ?
I know it support dynamic content page, but seems that works on already created content/page.
There are two ways:
You can either put all the content in an Excel file and use the "import content" option of the "Add new Content" button in the dotCMS admin "Content" tab. To know what the Excel structure should be, first download a piece of the content you plan to upload by clicking on the "Export button in the same page".
The second way is to use the Restfull content API. Check the documentation on how to use it.
Is it possible to embed image in markdown cell in gorilla-repl?
I would like to keep images in src folder in the root of leiningen project and be able to embed images into my worksheet with:
![plot 1](img/plot_1.png)
This does not look possible using the envisioned incantation.
The markdown implementation looks to be done in the browser in javascript, using codemirror, which for security reasons does not have the ability to load resources from the local file system when the origin is http://localhost.
It can, however, load resources over http, so using an http url for the resource in the markdown expression works.
One could conceivably teach gorilla to listen on a route that resolved to the src/ or resources/ directory on the local file system, but that would break if the worksheet were shared.
There would need to be a mechanism to turn the image data into a data:// url (with all the requisite limitations that entails) so it could be packaged with rendered worksheet html.
I want users to upload their themes containing .css, .js files to my server in zip format, Once they will upload the application will unzip it and the user will be able to see the theme at mysite.com/themes/user/. I want to know what security issues can occur if I allow user to upload .css and js files to my server. Can the malicious code redirect the site or do DOS service attack or change the dynamic aspects on my site. Scanning the files for malicious code before unzipping seems impractical. What safeguards should I take.
First and foremost, don't unzip them into a public "temp" folder while you're doing whatever else you're going to do with them.
There's no telling what that ZIP file will actually contain.
There's no telling what those JS files will try to do to your site.
You should read what Samy did to MySpace before you implement this functionality. (A breakdown of the attack.)
I've been messing around with AWS lately and it definitely great. As a first test I'm trying to host the most basic static website via S3. The site is simply just one html file and a few javascript, css and image files.
Whenever I load the static URL the only thing that loads is the index.html file, its contents and for some strange reason the only image that loads is my avatar, yet all the images are stored in the same folder. All of the css, js and image files are also written as relative links too of course.
I've made sure all the files and folders permissions are set to "world" multiple times.
I also looked at the network tab in dev tools and its giving me 200's on every GET request.
I'm completely stumped as to why this is happening. Does anyone have an idea of what I'm missing?
The url is available at http://www.mikefisher.io.s3-website-us-east-1.amazonaws.com/
I should add that the site works perfectly locally as well as on a traditional web server.
I checked my browser console and it gives me this error which I think might have something to do with it.
Resource interpreted as Stylesheet but transferred with MIME type binary/octet-stream:
Fixed it!
The issue I was having is the metadata for the CSS files in Amazon S3 were set to 'binary/octet-stream' by default.
The way I fixed this was selecting the individual files in the bucket, clicking the properties tab, then in the meta-data section typing in 'text/css' as the value.