tmcw / geojson.net

https://www.placemark.io/
ISC License
150 stars 32 forks source link

URL parameters as per API.md appear to be ignored. Work fine in geojson.IO instead of .NET #45

Closed Joel-MMCC closed 5 years ago

Joel-MMCC commented 5 years ago

The API.md file has several example links to demonstrate passing parameters via the URL. All of them except for the first one simply get changed to the first one when the map appears, and show no effect other than to display the entire world map but no geometry, no matter what the URL parameters are.

The same links, with the only change being that the domain is the deprecated “geojson.io” instead of “geojson.net”, appear in the geojson.io version of the file. Those work fine. Also, copying any of the example URLs from the geojson.NET API.md and pasting them into the browser bar, then changing the TLD of the URL from “.net” to “.io” also works just fine, but of course they then go to the deprecated geojson.IO.

Also, a minor thing: at the top of API.md in the geojson.net repository, the initial Header text still says “Geojson.io API.” Maybe that’s intentional because the API doesn’t work yet in geojson.NET? If so, maybe include a notation to that effect near the top of the file, that these are for future implementation.

Joel-MMCC commented 5 years ago

Since the fix was applied and this issue Closed, now the geojson.net just WSODs, with or without any URL parameters.

Here’s the complete returned HTML (note no tags in the <body> section that would display anything — just an empty <div> and some <script>:

<!DOCTYPE html>
<html>
<head>
  <meta charset='utf-8'>
  <meta http-equiv='X-UA-Compatible' content='IE=Edge'>
  <title>geojson.net</title>
  <link href='./node_modules/tachyons/src/tachyons.css' rel='stylesheet' />
  <link href='./css/leaflet.css' rel='stylesheet' />
  <link href='./node_modules/codemirror/lib/codemirror.css' rel='stylesheet' />
  <link href='./css/theme.css' rel='stylesheet' />
  <link href='./css/style.css' rel='stylesheet' />
  <link rel='icon' type='image/x-icon' href='./img/favicon.png' />
  <meta name='description' content='simply edit geojson map data' />
  <meta property='og:site_name' content='geojson.net'/>
  <meta name='viewport' content='initial-scale=1,maximum-scale=1'>
  <meta http-equiv="Content-Security-Policy" content="
    default-src
      'self'
      ;
    child-src
      'self'
      blob:
      ;
    connect-src
      'self'
      *
      ;
    font-src
      'self'
      ;
    frame-src
      'self'
      ;
    img-src
      'self'
      data:
      *
      ;
    script-src
      'self'
      'unsafe-eval'
      'unsafe-inline'
      ;
    style-src
      'self'
      'unsafe-inline'
      ;
  ">
  <style>
  /*
   * http://seclab.stanford.edu/websec/framebusting/framebust.pdf
   */
  body { display: none; }
  </style>
</head>
<body>

  <div id='geojsonnet'></div>

  <script>
    if (self == top) {
      document.getElementsByTagName ("body")[0].style.display = 'block';
    } else {
      top.location = self.location;
    }
  </script>
  <script src='./src/index.js'></script>
  </body>
</html>