[geomoose-psc] Thoughts on a JSON mapbook?

Brent Fraser bfraser at GeoAnalytic.com
Sun Jun 7 08:52:14 PDT 2020


(I was thinking of more of a replacement of XML with JSON in GM 4.)
  
 My mapbook.xml editing angst is mostly caused be lack of doc (which I'm 
trying to solve). I need to figure out:
  	what is possible? 	is this a bug or a misunderstanding on my part? 
  
 But if I can create map-sources and catalog layers using JavaScript, then 
problem solved (sort of).  As an experiment, I pared down the demo app.js 
to the minimum:
  

 var app = new gm3.Application();  app.add(gm3.components.Map, 'map', {});  
app.setView({     center: [-12700000, 6630000 ],     zoom: 10 });  
app.loadMapbook({url: 'mapbook.xml'}).then(function() {  });   

 Do you have a snippet of adding a map-source (instead of using the 
loadMapbook method)?
  
 Thanks!
  
  
 -------- Original Message --------
> From: "James Klassen" <klassen.js at gmail.com>
> Sent: June 7, 2020 9:26 AM
> To: "Brent Fraser" <bfraser at geoanalytic.com>
> Cc: "GeoMOOSE PSC" <geomoose-psc at lists.osgeo.org>
> Subject: Re: [geomoose-psc] Thoughts on a JSON mapbook?
>
> It should be possible and was discussed around 3.0 planning time. The
> mapbook loader is separate from the internal representation in 3.x. 
IIRC,
> a mapbook isn't needed at all in 3.x. You can make the API calls to set
> everything up directly from your app.js, the mapbook is more of a
> shortcut.
>
> In GeoMoose 3, app.js (or equivalent) is yours. We provide the examples 
to
> help people get started and to have something concrete to test.
>
> In general, GeoMoose 3 is much more of a library than GeoMoose 2.9 was.
> The example applications are setup to make users transitioning from
> GeoMoose 2.9 comfortable, not as the only way things can be done.
> (Although saying that, in practice the example apps are all that is
> regularly tested as part of the CI and release process).
>
> My concern is solely about having the human resources to maintain and 
test
> two formats as I don't think we can drop the XML mapbook without causing
> massive user pain. (I say this knowing how many times as is that we've
> missed updating/fixing something in the mobile example that was fixed in
> the desktop example).
>
> Personally, the mapbook format doesn't matter much because once the 
mapbook
> gets to a complexity where I am worried about editing difficulty, I end 
up
> generating it from a web service anyway. This lets you do things like 
have
> an online form for adding layers or have different mapbooks for 
different
> users (based on ACLs for layers). I also have equivalent GeoMoose 2.9 
and
> GeoMoose 3 mapbooks being generated from the same database this way.
>
> On Sun, Jun 7, 2020, 09:48 Brent Fraser <bfraser at geoanalytic.com> wrote:
>
> >
> > Hi All,
> >
> > I've been doing a lot of mapbook editing lately, and it occurred to me
> > that perhaps a JSON format for the mapbook might make editing easier.
> >
> > Thoughts?
> >
> > Best Regards,
> > Brent Fraser
> >
> >
> >
> > _______________________________________________
> > geomoose-psc mailing list
> > geomoose-psc at lists.osgeo.org
> > https://lists.osgeo.org/mailman/listinfo/geomoose-psc




More information about the geomoose-psc mailing list