From: Richard G. <ric...@gm...> - 2006-03-13 22:21:58
|
Hello All, I've taken to calling the Javascript projection library "cscs" as in "Coordinate System to Coordinate System", because we're trying to do more than just project/un-project, but I'm not fixated on this name. I would like some feedback regarding the cscs library interfaces. In my mind I see two interfaces: 1. is the client-side API that a program such as Mapbuilder would use to communicate with the cscs library in order to transform a coordinate. 2. is the client-server interface that the cscs library would communicate with a server(s) in order to get coordinate system (CS) definitions and additional Javascript code to support a requested transformation. I have a working client-side API. It is the client-server interface that I would be particularly interested in comments on. Ultimately the cscs library could support thousands of CSs (the epsg file that accompanies PROJ.4 lists >2700 CSs, ArcGIS 9.1 includes 3380 .prj files). We don't want to transfer all of the code and data required to define and support 3000 CSs when we are only going to need a couple. So here are general possibilities: 1. The cscs lib could be dozens (or thousands) of Javascript files. The HTML page that contains Mapbuilder (or similar Javascript WMS client) imports the cscs lib files that it needs for the CSs that it's going to use. The pages are hard-wired for the CSs they will be using. 2. A bit of cscs code is initially included in the page. When a CS gets selected (e.g. a CS object gets instantiated) the cscs code dynamically loads additional files required to define and convert the selected CS. All of the logic is on the client-side. cscs is just requesting additional static files from the server. 3. Similar to number 2, but the cscs stub makes a call to a server that returns data and executable js code to the client. The server could do some of the work, e.g. look up parameters for a given epsg code, etc. Number 1 is the easiest, but you have to know ahead of time what CSs you want. Number 2 is okay, but I don't know anything about dynamically loading Javascript (any pointers would be appreciated). Number 3 is okay, but it mean that cscs would not be a stand-alone client-side Javscript library. Thanks for reading. Rich -- Richard Greenwood ric...@gm... www.greenwoodmap.com |