Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Define a browser API to define a pannable/zoomable coordinate system that can be rendered like a pre-defined TCRS #240

Open
prushforth opened this issue Dec 1, 2020 · 1 comment

Comments

@prushforth
Copy link
Member

The WebRTC API is a browser-based API comprised of various JavaScript interfaces. WebRTC relies on <video>'s and <audio>'s capabilities (low level primitives) of the Web Platform, to allow Web developers to create two-way communication tools inside of Web apps.

In the future, if this project succeeds, the browser should be equipped with element(s) that support the rendering and management of tiled, georeferenced and non-spatial content that follows pre-known standardized tiled coordinate reference systems, similar to those that are defined by MapML, WMTS and so on.

Users may wish to define their own coordinate systems, and tiling structures.

This use case asserts that it should be possible to supply a standardized metadata JavaScript object that defines a previously unknown TCRS, that can be used by the map-supporting elements (<map>/<layer>?) to provide standard rendering and behaviour of non-standardized, but appropriately defined coordinate systems.

A WebRTC-like API architecture, that is a simple relationship between the API objects and the map-supporting elements should be defined.

Just to try to make it clear what I mean, you could define an API to which you supply the coordinate system-defining object, something like so (this is not real, just a sketch):

<html>
   <head> 
       <title>Non-standard TCRS example</title>
      <meta charset = "utf-8"> 
   </head>
   <body> 
      <map controls>
         <layer src="https://example.org/example/" label="Non-standard coordinate system (only, everything else standard!) layer source"></layer
      </map> 
   </body> 
      <script>
//checks if the browser supports Web maps 
 
if (navigator.getUserMapTCRS) { 
   var tcrs = navigator.getUserMapTCRS( {  
       resolutions: [ 0.703125, 0.3515625, 0.17578125, ... ],
       code: 'EPSG:1345', 
       proj4string: '+proj=laea +ellps=WGS84 +datum=WGS84 +no_defs ',
        etc }
   , function (err) {});
   var map = document.querySelector('map'); 
		
   //insert TCRS definition into the map tag 
   map.projection = tcrs; 
	
} else {
   alert("Error. Web maps not supported!"); 
}
      </script>

</html> 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant