[mapguide-users] POOL:DWF or AJAX

Walt Welton-Lair walt.welton-lair at autodesk.com
Thu Sep 14 11:59:25 EDT 2006


Actually in DWF Viewer there *is* API which lets you change the selection color.  See the attached HTML sample.  To run it, you just need to fill in your MapGuide server IP in the LoadMap() method.  Also, if you don't have the Sheboygan sample installed then you'll need to use a different map definition in the SourcePath string.

The AJAX Viewer does not have such an API.

Walt

-----Original Message-----
From: Joel Carranza [mailto:jec at gatekeeper.com] 
Sent: Thursday, September 14, 2006 1:05 AM
To: users at mapguide.osgeo.org
Subject: Re: [mapguide-users] POOL:DWF or AJAX


AJAX viewer "bugless" ? That is a pretty bold claim :)

While the "thinness" of the AJAX viewer certainly is appealing, I still get
a little uncomfortable everytime I think about the additional burden it puts
on the server in order to support selection and tooltips. We currently
author maps where almost everything is selectable, almost every feature has
a lengthy tooltip. In such an environment where users are doing alot of
object selection and tooltips, I just don't think the AJAX viewer will be
performant enough to satisfy our users moving from 6.5. I suspect alot of
people don't have this problem, but i'm just throwing my 2 cents in. 

I'm a big fan of vector output, for a couple reasons:
a) potentially more compact in terms of map request download
b) ideal for "disconnected" applications (where network connectivity is not
always available)
c) absolutely necessary for printing
d) easier to port existing MapGuide 6.5 applications

I would love to see vector output in a different format. The DWF viewer is a
major improvement over the MapGuide 6.5 viewer from our perspective because
its so much easier for us to customize for our own purposes. However,
deploying an ActiveX control is a big problem for alot of people. A java
viewer leveraging an open vector format would be way cool. I don't see any
reason why vector output should look worse than the raster output, although
I agree it does. (Why doesn't the DWF viewer do anti-aliasing?)

Something else that would be way cool that neither viewer has: Selected
objects being drawn in something other than solid blue....

Joel Carranza
Gatekeeper Systems


Ivan Miličević wrote:
> 
> Wich one you prefer?
> 
>  
> 
> For me, AJAX is better one.
> 
>  
> 
> Ajax:
> 
> -not needed plugin
> 
> -working with lot's of browsers
> 
> -visually looks better
> 
> -buugless
> 
> -more stable
> 
>  
> 
> DWF:
> 
> -faster
> 
> -better zooming, paning
> 
>  
> 
> Let's exchange expirience :-)
> 
> -------------------- 
> Ivan Miličević, voditelj razvoja
> iNEO d.o.o. 
> 091 502 9672 
> 
>  
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/POOL%3ADWF-or-AJAX-tf2268101.html#a6299527
Sent from the OSGeo MapGuide forum at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe at mapguide.osgeo.org
For additional commands, e-mail: users-help at mapguide.osgeo.org


-------------- next part --------------
<html>
    <body onLoad="doOnLoad();">
        <div align="center"> 
        <object id = "DWFViewer"
           classid = "clsid:A662DA7E-CCB7-4743-B71A-D817F6D575DF" CODEBASE="http://www.autodesk.com/global/expressviewer/installer/ExpressViewerSetup.cab"
            border = "1"
             width = "640"
            height = "480">
            <PARAM NAME="Src" value="">
            <PARAM NAME="ShowToolbar" value="True">
            <PARAM NAME="ShowNavpane" value="True">
            <PARAM NAME="NavpaneWidth" value="200">
            <PARAM NAME="ShowLayersBand" value="True">
            <PARAM NAME="ShowPropertiesBand" value="True">
            <PARAM NAME="ViewerParams" value="?PreferredDefaultInterface='{69BD6A6D-F788-4A34-BAE9-76AB5F69EF9D}">
        </object>
        <form>
            <input type="button" value="Load Map" onClick="LoadMap();">
        </form>
        <form>
            <input type="button" value="Get Selection Color Info" onClick="SelectTest();">
        </form>
    </body>

    <script language="JavaScript">
        function doOnLoad()
        {
            // the current product (DWF Viewer or Design Review)
            var productName = DWFViewer.ProductName;

            // create the event relayer object, accounting for the product
            var relayObj = document.createElement("OBJECT");
            relayObj.style.visibility = "hidden";
            relayObj.id = 'EMapEventRelayer';
            if (productName == "Autodesk DWF Viewer")
                relayObj.classid = 'clsid:90BB2003-1BA4-4D88-45BC-4734E453A8EF';
            else if (productName == "Autodesk Design Review")
                relayObj.classid = 'clsid:90BB2003-1BA4-4D88-45BC-5734E453A8EF';
            document.appendChild(relayObj);

            // add the relayer to the viewer
            DWFViewer.AddEventRelayer(EMapEventRelayer);
        }

        function LoadMap()
        {
            DWFViewer.SourcePath = "http://###.###.###.###:####/mapguide/mapagent/mapagent.fcgi?OPERATION=GETMAP&VERSION=1.0&MAPDEFINITION=Library://Samples/Sheboygan/Maps/Sheboygan.MapDefinition&DWFVERSION=6.01&EMAPVERSION=1.0&LOCALE=en&reload=true";
            var EMapViewer = DWFViewer.DocumentHandler;
           
            var selectColor = EMapViewer.DefaultSelectionColor;
            selectColor.setColor(255, 255, 0, 255); // yellow, fully opaque for the alpha
            EMapViewer.DefaultSelectionColor = selectColor;
        }

        function SelectTest()
        {
            var EMapViewer = DWFViewer.DocumentHandler;
            var selectColor = EMapViewer.DefaultSelectionColor;
            alert(selectColor.Red);
            alert(selectColor.Green);
            alert(selectColor.Blue);
            alert(selectColor.Alpha);
        }
    </script>
</html>


More information about the Mapguide-users mailing list