grst / geos

Google Earth Overlay Server - display map overlays in Google Earth
https://grst.github.io/geos
BSD 3-Clause "New" or "Revised" License
42 stars 12 forks source link

Add '--display-*' cli-args for formatted url modification #8

Closed p-ho closed 7 years ago

p-ho commented 7 years ago

(useful behind a reverse-proxy)

Example:

     +-----------------------------------------+     +-----------------------------+
---->| reverse-proxy: https://geos.example.org |<--->| geos: http://localhost:5000 |
     +-----------------------------------------+     +-----------------------------+

Then, one could run geos by executing:

$ geos --host 127.0.0.1 --port 5000 --display-host geos.example.org  --display-port 443 --display-scheme https

Now kml-master.kml reads:

<?xml version='1.0' encoding='ASCII'?>
<kml xmlns:atom="http://www.w3.org/2005/Atom" xmlns:gx="http://www.google.com/kml/ext/2.2" xmlns="http://www.opengis.net/kml/2.2">
  <Document>
    <NetworkLink>
      <name>OSM Mapnik (default)</name>
      <visibility>0</visibility>
      <Link>
        <href>https://geos.example.org:443/maps/default.kml</href>
        <viewRefreshMode>onRegion</viewRefreshMode>
      </Link>
    </NetworkLink>
    <NetworkLink>
      [...]
    </NetworkLink>
  </Document>
</kml>