[mapguide-internals] Re: OpenLayers + SVG = MapGuide Vector Viewer

Trevor Wekel trevor_wekel at otxsystems.com
Thu Sep 16 12:12:54 EDT 2010


[I apologize for the length of this email - I should probably start writing an RFC...]

Perhaps I should have written the original email up as OpenLayers + SVG/VML/Canvas.  OpenLayers vectors are drawn by one of the three renderers depending on browser support.  SVG is the fastest renderer, Canvas is a bit slower, and VML is significantly slower.  But they still render.

So OpenLayers does vector today.  The real question is "How much vector can each browser support?  Perhaps we need to set up an OpenLayers map with a few vector layers as a simulation.  This link doesn't have enough geometry to be considered a realistic test case but it does show the vector capability http://dev.openlayers.org/releases/OpenLayers-2.10/examples/sld.html


Let me try to put a little more meat to our discussion by putting down a few implementation details and expanding on how those details affect user interaction:

Detail 1: Client downloads compressed JSON representing geometry and attributes for each feature.
- This is easily supported by all browsers assuming Javascript execution performance is acceptable.

Detail 2: Client can render simple geometry and perform hit tests on JSON geometry.
- We may need an R-Tree in javascript.
- This can be supported by all browsers.  Slow javascript engines may bog down a little.

Detail 3: Client maintains center, scale, and legend state (layers on/off)
- Changes to the MgMap interaction model will require some thought.  For example, scripts doing server side layer creation, processing, etc., may need to feed the center and scale in before processing begins.
- This is easily supported by all browsers.
 
Detail 4: Client downloads layer definitions and can render all MapGuide stylization
- We may be able to leverage existing OpenLayers code to perform the stylization.  "Getting some style" may be a simple translation between the LayerDefinition and OpenLayers vector stylization.
- Rendering speed and the number of supported vertices will be dependent on SVG/VML/Canvas rendering.
- Browser support will be mixed. 


Detail 1 by itself is not very useful.

Detail 1 and 2 together are significant.  They enable all attribute queries and all selection to be processed directly by the browser. 

Detail 3 and 4 together represent a major offload of the navigation model to the browser.  Pulling features outside of the screen area and a knowledge of scale ranges would enable to browser to perform limited panning and zooming without even touching the server.  Layers and groups could be turned on and off at will without ever sending a single HTTP request back to the server.

Together, Details 1 to 4 are the core of a MapGuide vector viewer.  I believe this core would be supported by all browsers but browsers without SVG and a fast javascript engine may be limited in what they can display.  Combining Detail 1 and 2 with the existing interaction model may be an option for "previous generation" browsers. 

Regards,
Trevor

-----Original Message-----
From: mapguide-internals-bounces at lists.osgeo.org [mailto:mapguide-internals-bounces at lists.osgeo.org] On Behalf Of Jason Birch
Sent: September 16, 2010 2:17 AM
To: MapGuide Internals Mail List
Subject: Re: [mapguide-internals] Re: OpenLayers + SVG = MapGuide Vector Viewer

I have to disagree.  Many of us live in a reality where we don't get to
choose who accesses our sites or the tools they use.  It's absolutely easier
to make clean breaks, start fresh, etc, but it's a disservice to our users.
 It doesn't take a lot of extra engineering effort to save countless
integrators time and headaches in having to author and support multiple
sites (or one old slow site or, more likely moving to a different
technology).

IMO :)


On 15 September 2010 17:14, Traian Stanev wrote:

>
> Yeah, no reason to hamper progress of all platforms because of one inferior
> platform.
>
> -----Original Message-----
> From:Jackie Ng
>
> I've said it before in the past and I'll say it again:
>
> People who choose to live in the past (whether by choice or not) can stick
> with the basic AJAX viewer.
>
>
_______________________________________________
mapguide-internals mailing list
mapguide-internals at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapguide-internals



More information about the mapguide-internals mailing list