From: Cameron S. <cam...@gm...> - 2007-05-14 05:10:56
|
Paul, Yes, in general we should be minimising the files we download, but I think projections are a special case. There are thousands of projections or which we only need one. So the idea is that we download the core Projection code as part of the Mapbuilder compressed file, and one (or 2) extra small projection constants file. Paul Spencer wrote: > On 13-May-07, at 6:21 PM, Richard Greenwood wrote: > >>> In my head, JSON is the same as your suggestion of splitting each datum >>> into separate files. >>> JSON is a format to describe data in Javascript. Ie, it is Javascript >>> data without javascript functions. >>> My understanding is that CSCS should load 2 files: >>> 1. The JS functions like forward() and reverse() >>> 2. One JS transform file which contains parameters for a particular >>> projection. >>> Is this in line with what you are suggesting? >> >> Pretty much. You might end up loading more than 2 files, e.g. you >> always load cscs.js as this is the base. You'd load 1 or more for >> projection(s) you wish to work with, you might load the datum >> transformation code if you need it, and you'd load a 1 line file for >> each EPSG definition that you need. (Excluding long/lat which is >> included by default). I have comments in the test page that explpain >> this. > > Just a comment ... there seems to be a general move away form having > to load many small js files in ajax applications primarily because of > performance reasons (multiple connections cause more overhead than > just jamming it all into a single file). I would highly recommend > that you provide a pre-minimized cscs.js file that has everything in > it, or a mechanism to build a cscs.js file that has what you need in > it (if the whole thing is too big). Dynamic loading is really nice > for development but I'm personally starting to realize the need for > minimizing connection overhead in deployed applications > > Cheers > > Paul > > +-----------------------------------------------------------------+ > |Paul Spencer psp...@dm... | > +-----------------------------------------------------------------+ > |Chief Technology Officer | > |DM Solutions Group Inc http://www.dmsolutions.ca/ | > +-----------------------------------------------------------------+ > > > > > > > > -- Cameron Shorter Systems Architect, http://lisasoft.com.au Tel: +61 (0)2 8570 5050 Mob: +61 (0)419 142 254 |