MapServer Transparent PNG Layers

12 messages Options
Embed this post
Permalink
Nolte, Tim

MapServer Transparent PNG Layers

Reply Threaded More More options
Print post
Permalink
I'm attempting to user multiple MapServer maps using transparent PNGs so
that the end-user perception is that things load much faster. I'm
running into two problems:

1.) The 4 defined maps are not stacking correctly, getting my last map
(points.map) underneath one of the others (us_streets.map). But what is
interesting is that this behavior is not consistent, sometimes they are
in the right order but sometimes they are not.

                <MapGroup id="mapserver" xsi:type="MapType">
                        <Map xsi:type="MapLayerType">
                                <Type>MapServer</Type>
                                <SingleTile>true</SingleTile>
                                <Extension xsi:type="CustomContentType">
       
<MapFile>/export/home/www/ipcs/map/basemap.map</MapFile>
                                        <Options>
       
<isBaseLayer>true</isBaseLayer>
                                        </Options>
                                </Extension>
                        </Map>
                        <Map xsi:type="MapLayerType">
                                <Type>MapServer</Type>
                                <SingleTile>true</SingleTile>
                                <Extension xsi:type="CustomContentType">
       
<MapFile>/export/home/www/ipcs/map/regions.map</MapFile>
                                        <Options>
       
<isBaseLayer>false</isBaseLayer>
                                        </Options>
                                </Extension>
                        </Map>
                        <Map xsi:type="MapLayerType">
                                <Type>MapServer</Type>
                                <SingleTile>true</SingleTile>
                                <Extension xsi:type="CustomContentType">
       
<MapFile>/export/home/www/ipcs/map/us_streets.map</MapFile>
                                        <Options>
       
<isBaseLayer>false</isBaseLayer>
                                        </Options>
                                </Extension>
                        </Map>
                        <Map xsi:type="MapLayerType">
                                <Type>MapServer</Type>
                                <SingleTile>true</SingleTile>
                                <Extension xsi:type="CustomContentType">
       
<MapFile>/export/home/www/ipcs/map/points.map</MapFile>
                                        <Options>
       
<isBaseLayer>false</isBaseLayer>
                                        </Options>
                                </Extension>
                        </Map>
                </MapGroup>

                <MapWidget xsi:type="WidgetType">
                        <Name>Map</Name>
                        <Type>Map</Type>
                        <StatusText>The map.</StatusText>
                        <Extension xsi:type="CustomContentType">
       
<MenuContainer>MapContextMenu</MenuContainer>
                        </Extension>
                        <MapId>mapserver</MapId>
                </MapWidget>

2.) When I try the above map setup the Legend sort of breaks. I have to
set ShowMapFolder to 'true' in order to even get something more then
just the first group of the base layer to show up in the Legend. Also
most of the individual layers with their legend symbols show up, with
the exception of the few layers that I have condition CLASSes on. I'm
attaching 2 screen shots as examples. Does anyone have any ideas how to
fix this?

                <Widget xsi:type="WidgetType">
                        <Name>Legend</Name>
                        <Type>Legend</Type>
                        <StatusText/>
                        <Extension xsi:type="CustomContentType">
       
<HideInvisibleLayers>true</HideInvisibleLayers>
                                <ShowRootFolder>false</ShowRootFolder>
                                <ShowMapFolder>true</ShowMapFolder>
                                <GroupInfoIcon/>
                        </Extension>
                </Widget>

----
Timothy J Nolte - [hidden email]
Network Planning Engineer

iPCS Wireless, Inc.
4717 Broadmoor Ave, Suite G
Kentwood, MI 49512

Office: 616-656-5163
PCS:    616-706-2438
Fax:    616-554-6484
Web: www.ipcswirelessinc.com



_______________________________________________
fusion-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/fusion-users

ShowMapFolder_false.png (359K) Download Attachment
ShowMapFolder_true.png (443K) Download Attachment
Mark Gardner

RE: MapServer Transparent PNG Layers

Reply Threaded More More options
Print post
Permalink
I'm not sure on how to fix the overlay map order issue but I was able to correct the legend issue with the maps that I am working with by changing the Legend.js widget source. Here are my changes:

    renderLegend: function(r) {
        this.bIsDrawn = false;
        this.clear();

        if (this.showRootFolder) {
            this.oRoot.itemLabelobj.innerHTML = this.getMap().getMapTitle();
        }

        if (this.showMapFolder) {
            this.renderGroup(this.layerRoot);
        } else {
            for (var i = 0; i < this.layerRoot.groups.length; i++)
                this.renderGroup(this.layerRoot.groups[i]);
        }

        this.bIsDrawn = true;
        this.update();
    },

    renderGroup: function(group) {
        if (!group.legend) {
            group.legend = {};
            group.legend.treeItem = this.oRoot;
        }
        for (var i = 0; i < group.groups.length; i++) {
            this.processMapGroup(group.groups[i], this.oRoot);
        }
        for (var i = 0; i < group.layers.length; i++) {
            this.processMapLayer(group.layers[i], this.oRoot);
        }
    }

It might not be correctly done since I am fairly new to fusion, but it gets the job done. Hope it helps :).

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of Nolte, Tim
Sent: Friday, October 23, 2009 3:00 PM
To: [hidden email]
Subject: [fusion-users] MapServer Transparent PNG Layers

I'm attempting to user multiple MapServer maps using transparent PNGs so that the end-user perception is that things load much faster. I'm running into two problems:

1.) The 4 defined maps are not stacking correctly, getting my last map
(points.map) underneath one of the others (us_streets.map). But what is interesting is that this behavior is not consistent, sometimes they are in the right order but sometimes they are not.

                <MapGroup id="mapserver" xsi:type="MapType">
                        <Map xsi:type="MapLayerType">
                                <Type>MapServer</Type>
                                <SingleTile>true</SingleTile>
                                <Extension xsi:type="CustomContentType">
       
<MapFile>/export/home/www/ipcs/map/basemap.map</MapFile>
                                        <Options>
       
<isBaseLayer>true</isBaseLayer>
                                        </Options>
                                </Extension>
                        </Map>
                        <Map xsi:type="MapLayerType">
                                <Type>MapServer</Type>
                                <SingleTile>true</SingleTile>
                                <Extension xsi:type="CustomContentType">
       
<MapFile>/export/home/www/ipcs/map/regions.map</MapFile>
                                        <Options>
       
<isBaseLayer>false</isBaseLayer>
                                        </Options>
                                </Extension>
                        </Map>
                        <Map xsi:type="MapLayerType">
                                <Type>MapServer</Type>
                                <SingleTile>true</SingleTile>
                                <Extension xsi:type="CustomContentType">
       
<MapFile>/export/home/www/ipcs/map/us_streets.map</MapFile>
                                        <Options>
       
<isBaseLayer>false</isBaseLayer>
                                        </Options>
                                </Extension>
                        </Map>
                        <Map xsi:type="MapLayerType">
                                <Type>MapServer</Type>
                                <SingleTile>true</SingleTile>
                                <Extension xsi:type="CustomContentType">
       
<MapFile>/export/home/www/ipcs/map/points.map</MapFile>
                                        <Options>
       
<isBaseLayer>false</isBaseLayer>
                                        </Options>
                                </Extension>
                        </Map>
                </MapGroup>

                <MapWidget xsi:type="WidgetType">
                        <Name>Map</Name>
                        <Type>Map</Type>
                        <StatusText>The map.</StatusText>
                        <Extension xsi:type="CustomContentType">
       
<MenuContainer>MapContextMenu</MenuContainer>
                        </Extension>
                        <MapId>mapserver</MapId>
                </MapWidget>

2.) When I try the above map setup the Legend sort of breaks. I have to set ShowMapFolder to 'true' in order to even get something more then just the first group of the base layer to show up in the Legend. Also most of the individual layers with their legend symbols show up, with the exception of the few layers that I have condition CLASSes on. I'm attaching 2 screen shots as examples. Does anyone have any ideas how to fix this?

                <Widget xsi:type="WidgetType">
                        <Name>Legend</Name>
                        <Type>Legend</Type>
                        <StatusText/>
                        <Extension xsi:type="CustomContentType">
       
<HideInvisibleLayers>true</HideInvisibleLayers>
                                <ShowRootFolder>false</ShowRootFolder>
                                <ShowMapFolder>true</ShowMapFolder>
                                <GroupInfoIcon/>
                        </Extension>
                </Widget>

----
Timothy J Nolte - [hidden email]
Network Planning Engineer

iPCS Wireless, Inc.
4717 Broadmoor Ave, Suite G
Kentwood, MI 49512

Office: 616-656-5163
PCS:    616-706-2438
Fax:    616-554-6484
Web: www.ipcswirelessinc.com
_______________________________________________
fusion-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/fusion-users
Nolte, Tim

MapServer Legend Icons

Reply Threaded More More options
Print post
Permalink
In reply to this post by Nolte, Tim
Last week I had posted about a problem with my legend icons not showing
up. I have multiple MapServer mapfiles defined. I'm not sure if the
problem I'm having is solely related to having multiple mapfiles or that
I recently updated to the latest Fusion trunk. I can say that the
problem with the legend icons is because of an error in
layers\MapServer\php\LoadScaleRanges.php, the section that it is having
a problem with is:

        $oImg = $oClass->createLegendIcon($nIconWidth, $nIconHeight);

This is failing with the error:

        Fatal error: Call to a member function createLegendIcon() on a
non-object

If I change the code to make sure that '$oClass' is not NULL then legend
icons do get created but they are not being created correctly. I'm not
sure if this is something where I need to use a different built-in
function to use one of the default Fusion layer icons? If anyone has any
ideas it would be a big help.

- Tim

----
Timothy J Nolte - [hidden email]
Network Planning Engineer

iPCS Wireless, Inc.
4717 Broadmoor Ave, Suite G
Kentwood, MI 49512

Office: 616-656-5163
PCS:    616-706-2438
Fax:    616-554-6484
Web: www.ipcswirelessinc.com
_______________________________________________
fusion-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/fusion-users
Paul Spencer-2

Re: MapServer Legend Icons

Reply Threaded More More options
Print post
Permalink
Hi Tim,

The legend icon stuff is working in another project that Paul  
Deschamps is working on, he has multiple map files and a menu for  
changing between them.  The legend does appear to update correctly  
when changing maps.

The way it *should* work is that LoadMap.php populates a session  
variable 'scale_ranges' with an array of each scale range of each  
class of each layer.  LoadScaleRanges.php uses this array to get the  
class for each scale range and draw the icon at the appropriate scale  
for that class and then combines them all into a single image, and  
returns a set of CSS offset values for use by the legend - so each  
scale range has the same image source but different offsets.

I suspect what is going wrong is that the scale_ranges array is  
somehow the wrong one.  We need to know what sequence is causing  
this.  Is LoadScaleRanges being called before LoadMap finishes?  Or  
are you programmatically changing maps while loading them or between  
loading and calling LoadScaleRanges?

Cheers

Paul


On 2009-10-26, at 10:38 AM, Nolte, Tim wrote:

> Last week I had posted about a problem with my legend icons not  
> showing
> up. I have multiple MapServer mapfiles defined. I'm not sure if the
> problem I'm having is solely related to having multiple mapfiles or  
> that
> I recently updated to the latest Fusion trunk. I can say that the
> problem with the legend icons is because of an error in
> layers\MapServer\php\LoadScaleRanges.php, the section that it is  
> having
> a problem with is:
>
> $oImg = $oClass->createLegendIcon($nIconWidth, $nIconHeight);
>
> This is failing with the error:
>
> Fatal error: Call to a member function createLegendIcon() on a
> non-object
>
> If I change the code to make sure that '$oClass' is not NULL then  
> legend
> icons do get created but they are not being created correctly. I'm not
> sure if this is something where I need to use a different built-in
> function to use one of the default Fusion layer icons? If anyone has  
> any
> ideas it would be a big help.
>
> - Tim
>
> ----
> Timothy J Nolte - [hidden email]
> Network Planning Engineer
>
> iPCS Wireless, Inc.
> 4717 Broadmoor Ave, Suite G
> Kentwood, MI 49512
>
> Office: 616-656-5163
> PCS:    616-706-2438
> Fax:    616-554-6484
> Web: www.ipcswirelessinc.com
> _______________________________________________
> fusion-users mailing list
> [hidden email]
> http://lists.osgeo.org/mailman/listinfo/fusion-users


__________________________________________

    Paul Spencer
    Chief Technology Officer
    DM Solutions Group Inc
    http://research.dmsolutions.ca/

_______________________________________________
fusion-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/fusion-users
Nolte, Tim

RE: MapServer Legend Icons

Reply Threaded More More options
Print post
Permalink
What I am seeing with Firebug is that there are 6 calls to LoadMap.php,
which are my 5 main maps and 1 overview map. After the 5th LoadMap.php
call then the LoadScaleRanges.php calls begin, there are 5 calls. One
thing that I noticed also is that the MapTips are not working and what
is being POSTed to the MapTip.php script is the wrong map for the layer
that I've selected for MapTips. Seems like there could be a problem with
using the SESSION if the LoadMap.php is not adding something to the
SESSION to directly link the call to the LoadScaleRanges.php so that
it's not pulling the wrong scale_ranges. Is there any debugging
information that I can send?

- Tim

----
Timothy J Nolte - [hidden email]
Network Planning Engineer

iPCS Wireless, Inc.
4717 Broadmoor Ave, Suite G
Kentwood, MI 49512

Office: 616-656-5163
PCS:    616-706-2438
Fax:    616-554-6484
Web: www.ipcswirelessinc.com
-----Original Message-----
From: [hidden email]
[mailto:[hidden email]] On Behalf Of Paul Spencer
Sent: Monday, October 26, 2009 11:30 AM
To: Nolte, Tim
Cc: [hidden email]
Subject: Re: [fusion-users] MapServer Legend Icons

Hi Tim,

The legend icon stuff is working in another project that Paul  
Deschamps is working on, he has multiple map files and a menu for  
changing between them.  The legend does appear to update correctly  
when changing maps.

The way it *should* work is that LoadMap.php populates a session  
variable 'scale_ranges' with an array of each scale range of each  
class of each layer.  LoadScaleRanges.php uses this array to get the  
class for each scale range and draw the icon at the appropriate scale  
for that class and then combines them all into a single image, and  
returns a set of CSS offset values for use by the legend - so each  
scale range has the same image source but different offsets.

I suspect what is going wrong is that the scale_ranges array is  
somehow the wrong one.  We need to know what sequence is causing  
this.  Is LoadScaleRanges being called before LoadMap finishes?  Or  
are you programmatically changing maps while loading them or between  
loading and calling LoadScaleRanges?

Cheers

Paul


On 2009-10-26, at 10:38 AM, Nolte, Tim wrote:

> Last week I had posted about a problem with my legend icons not  
> showing
> up. I have multiple MapServer mapfiles defined. I'm not sure if the
> problem I'm having is solely related to having multiple mapfiles or  
> that
> I recently updated to the latest Fusion trunk. I can say that the
> problem with the legend icons is because of an error in
> layers\MapServer\php\LoadScaleRanges.php, the section that it is  
> having
> a problem with is:
>
> $oImg = $oClass->createLegendIcon($nIconWidth, $nIconHeight);
>
> This is failing with the error:
>
> Fatal error: Call to a member function createLegendIcon() on a
> non-object
>
> If I change the code to make sure that '$oClass' is not NULL then  
> legend
> icons do get created but they are not being created correctly. I'm not
> sure if this is something where I need to use a different built-in
> function to use one of the default Fusion layer icons? If anyone has  
> any
> ideas it would be a big help.
>
> - Tim
>
> ----
> Timothy J Nolte - [hidden email]
> Network Planning Engineer
>
> iPCS Wireless, Inc.
> 4717 Broadmoor Ave, Suite G
> Kentwood, MI 49512
>
> Office: 616-656-5163
> PCS:    616-706-2438
> Fax:    616-554-6484
> Web: www.ipcswirelessinc.com
> _______________________________________________
> fusion-users mailing list
> [hidden email]
> http://lists.osgeo.org/mailman/listinfo/fusion-users


__________________________________________

    Paul Spencer
    Chief Technology Officer
    DM Solutions Group Inc
    http://research.dmsolutions.ca/

_______________________________________________
fusion-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/fusion-users

_______________________________________________
fusion-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/fusion-users
Paul Spencer-2

Re: MapServer Legend Icons

Reply Threaded More More options
Print post
Permalink
Ohhhhh - light goes on - doh!  You have 6 maps in the same map group!  
This will need a bit of work :)  We need to modify the scale_ranges  
array in the session so that it is subdivided by map name.  LoadMap  
needs to set

$_SESSION['scale_ranges'][$mapName]

and LoadScaleRanges needs to use the same thing when referencing it.  
Do you think you could make these changes and test?  If it works, I'll  
file the bug and commit.  If you don't want to try first, I can take a  
stab at it and commit but I'm not really set up to test right now.

Thanks Tim

Paul


On 2009-10-26, at 2:39 PM, Nolte, Tim wrote:

> What I am seeing with Firebug is that there are 6 calls to  
> LoadMap.php,
> which are my 5 main maps and 1 overview map. After the 5th LoadMap.php
> call then the LoadScaleRanges.php calls begin, there are 5 calls. One
> thing that I noticed also is that the MapTips are not working and what
> is being POSTed to the MapTip.php script is the wrong map for the  
> layer
> that I've selected for MapTips. Seems like there could be a problem  
> with
> using the SESSION if the LoadMap.php is not adding something to the
> SESSION to directly link the call to the LoadScaleRanges.php so that
> it's not pulling the wrong scale_ranges. Is there any debugging
> information that I can send?
>
> - Tim
>
> ----
> Timothy J Nolte - [hidden email]
> Network Planning Engineer
>
> iPCS Wireless, Inc.
> 4717 Broadmoor Ave, Suite G
> Kentwood, MI 49512
>
> Office: 616-656-5163
> PCS:    616-706-2438
> Fax:    616-554-6484
> Web: www.ipcswirelessinc.com
> -----Original Message-----
> From: [hidden email]
> [mailto:[hidden email]] On Behalf Of Paul  
> Spencer
> Sent: Monday, October 26, 2009 11:30 AM
> To: Nolte, Tim
> Cc: [hidden email]
> Subject: Re: [fusion-users] MapServer Legend Icons
>
> Hi Tim,
>
> The legend icon stuff is working in another project that Paul
> Deschamps is working on, he has multiple map files and a menu for
> changing between them.  The legend does appear to update correctly
> when changing maps.
>
> The way it *should* work is that LoadMap.php populates a session
> variable 'scale_ranges' with an array of each scale range of each
> class of each layer.  LoadScaleRanges.php uses this array to get the
> class for each scale range and draw the icon at the appropriate scale
> for that class and then combines them all into a single image, and
> returns a set of CSS offset values for use by the legend - so each
> scale range has the same image source but different offsets.
>
> I suspect what is going wrong is that the scale_ranges array is
> somehow the wrong one.  We need to know what sequence is causing
> this.  Is LoadScaleRanges being called before LoadMap finishes?  Or
> are you programmatically changing maps while loading them or between
> loading and calling LoadScaleRanges?
>
> Cheers
>
> Paul
>
>
> On 2009-10-26, at 10:38 AM, Nolte, Tim wrote:
>
>> Last week I had posted about a problem with my legend icons not
>> showing
>> up. I have multiple MapServer mapfiles defined. I'm not sure if the
>> problem I'm having is solely related to having multiple mapfiles or
>> that
>> I recently updated to the latest Fusion trunk. I can say that the
>> problem with the legend icons is because of an error in
>> layers\MapServer\php\LoadScaleRanges.php, the section that it is
>> having
>> a problem with is:
>>
>> $oImg = $oClass->createLegendIcon($nIconWidth, $nIconHeight);
>>
>> This is failing with the error:
>>
>> Fatal error: Call to a member function createLegendIcon() on a
>> non-object
>>
>> If I change the code to make sure that '$oClass' is not NULL then
>> legend
>> icons do get created but they are not being created correctly. I'm  
>> not
>> sure if this is something where I need to use a different built-in
>> function to use one of the default Fusion layer icons? If anyone has
>> any
>> ideas it would be a big help.
>>
>> - Tim
>>
>> ----
>> Timothy J Nolte - [hidden email]
>> Network Planning Engineer
>>
>> iPCS Wireless, Inc.
>> 4717 Broadmoor Ave, Suite G
>> Kentwood, MI 49512
>>
>> Office: 616-656-5163
>> PCS:    616-706-2438
>> Fax:    616-554-6484
>> Web: www.ipcswirelessinc.com
>> _______________________________________________
>> fusion-users mailing list
>> [hidden email]
>> http://lists.osgeo.org/mailman/listinfo/fusion-users
>
>
> __________________________________________
>
>    Paul Spencer
>    Chief Technology Officer
>    DM Solutions Group Inc
>    http://research.dmsolutions.ca/
>
> _______________________________________________
> fusion-users mailing list
> [hidden email]
> http://lists.osgeo.org/mailman/listinfo/fusion-users
>


__________________________________________

    Paul Spencer
    Chief Technology Officer
    DM Solutions Group Inc
    http://research.dmsolutions.ca/

_______________________________________________
fusion-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/fusion-users
Nolte, Tim

RE: MapServer Legend Icons

Reply Threaded More More options
Print post
Permalink
I'll work on this. Seems like and easy fix. Once I get the fix working
I'll send you the code changes. Thanks!

- Tim

----
Timothy J Nolte - [hidden email]
Network Planning Engineer

iPCS Wireless, Inc.
4717 Broadmoor Ave, Suite G
Kentwood, MI 49512

Office: 616-656-5163
PCS:    616-706-2438
Fax:    616-554-6484
Web: www.ipcswirelessinc.com
-----Original Message-----
From: [hidden email]
[mailto:[hidden email]] On Behalf Of Paul Spencer
Sent: Monday, October 26, 2009 3:07 PM
To: Nolte, Tim
Cc: [hidden email]
Subject: Re: [fusion-users] MapServer Legend Icons

Ohhhhh - light goes on - doh!  You have 6 maps in the same map group!  
This will need a bit of work :)  We need to modify the scale_ranges  
array in the session so that it is subdivided by map name.  LoadMap  
needs to set

$_SESSION['scale_ranges'][$mapName]

and LoadScaleRanges needs to use the same thing when referencing it.  
Do you think you could make these changes and test?  If it works, I'll  
file the bug and commit.  If you don't want to try first, I can take a  
stab at it and commit but I'm not really set up to test right now.

Thanks Tim

Paul


On 2009-10-26, at 2:39 PM, Nolte, Tim wrote:

> What I am seeing with Firebug is that there are 6 calls to  
> LoadMap.php,
> which are my 5 main maps and 1 overview map. After the 5th LoadMap.php
> call then the LoadScaleRanges.php calls begin, there are 5 calls. One
> thing that I noticed also is that the MapTips are not working and what
> is being POSTed to the MapTip.php script is the wrong map for the  
> layer
> that I've selected for MapTips. Seems like there could be a problem  
> with
> using the SESSION if the LoadMap.php is not adding something to the
> SESSION to directly link the call to the LoadScaleRanges.php so that
> it's not pulling the wrong scale_ranges. Is there any debugging
> information that I can send?
>
> - Tim
>
> ----
> Timothy J Nolte - [hidden email]
> Network Planning Engineer
>
> iPCS Wireless, Inc.
> 4717 Broadmoor Ave, Suite G
> Kentwood, MI 49512
>
> Office: 616-656-5163
> PCS:    616-706-2438
> Fax:    616-554-6484
> Web: www.ipcswirelessinc.com
> -----Original Message-----
> From: [hidden email]
> [mailto:[hidden email]] On Behalf Of Paul  
> Spencer
> Sent: Monday, October 26, 2009 11:30 AM
> To: Nolte, Tim
> Cc: [hidden email]
> Subject: Re: [fusion-users] MapServer Legend Icons
>
> Hi Tim,
>
> The legend icon stuff is working in another project that Paul
> Deschamps is working on, he has multiple map files and a menu for
> changing between them.  The legend does appear to update correctly
> when changing maps.
>
> The way it *should* work is that LoadMap.php populates a session
> variable 'scale_ranges' with an array of each scale range of each
> class of each layer.  LoadScaleRanges.php uses this array to get the
> class for each scale range and draw the icon at the appropriate scale
> for that class and then combines them all into a single image, and
> returns a set of CSS offset values for use by the legend - so each
> scale range has the same image source but different offsets.
>
> I suspect what is going wrong is that the scale_ranges array is
> somehow the wrong one.  We need to know what sequence is causing
> this.  Is LoadScaleRanges being called before LoadMap finishes?  Or
> are you programmatically changing maps while loading them or between
> loading and calling LoadScaleRanges?
>
> Cheers
>
> Paul
>
>
> On 2009-10-26, at 10:38 AM, Nolte, Tim wrote:
>
>> Last week I had posted about a problem with my legend icons not
>> showing
>> up. I have multiple MapServer mapfiles defined. I'm not sure if the
>> problem I'm having is solely related to having multiple mapfiles or
>> that
>> I recently updated to the latest Fusion trunk. I can say that the
>> problem with the legend icons is because of an error in
>> layers\MapServer\php\LoadScaleRanges.php, the section that it is
>> having
>> a problem with is:
>>
>> $oImg = $oClass->createLegendIcon($nIconWidth, $nIconHeight);
>>
>> This is failing with the error:
>>
>> Fatal error: Call to a member function createLegendIcon() on a
>> non-object
>>
>> If I change the code to make sure that '$oClass' is not NULL then
>> legend
>> icons do get created but they are not being created correctly. I'm  
>> not
>> sure if this is something where I need to use a different built-in
>> function to use one of the default Fusion layer icons? If anyone has
>> any
>> ideas it would be a big help.
>>
>> - Tim
>>
>> ----
>> Timothy J Nolte - [hidden email]
>> Network Planning Engineer
>>
>> iPCS Wireless, Inc.
>> 4717 Broadmoor Ave, Suite G
>> Kentwood, MI 49512
>>
>> Office: 616-656-5163
>> PCS:    616-706-2438
>> Fax:    616-554-6484
>> Web: www.ipcswirelessinc.com
>> _______________________________________________
>> fusion-users mailing list
>> [hidden email]
>> http://lists.osgeo.org/mailman/listinfo/fusion-users
>
>
> __________________________________________
>
>    Paul Spencer
>    Chief Technology Officer
>    DM Solutions Group Inc
>    http://research.dmsolutions.ca/
>
> _______________________________________________
> fusion-users mailing list
> [hidden email]
> http://lists.osgeo.org/mailman/listinfo/fusion-users
>


__________________________________________

    Paul Spencer
    Chief Technology Officer
    DM Solutions Group Inc
    http://research.dmsolutions.ca/

_______________________________________________
fusion-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/fusion-users

_______________________________________________
fusion-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/fusion-users
Nolte, Tim

RE: MapServer Legend Icons

Reply Threaded More More options
Print post
Permalink
In reply to this post by Paul Spencer-2
Paul,

I attempted this, however what I found was that the way the loading
process happens it is not enough to just stick the scale ranges into the
PHP $_SESSION. I'm finding that all of the individual maps in many cases
don't yet exist in the SESSION when the corresponding LoadScaleRanges is
called. Do you have any thoughts on how Fusion could be changed to only
call LoadScaleRanges 1 time after all of the LoadMap calls have
finished? I think this could be the fix. The only other option I see is
that the whole scale ranges creation process needs to be duplicated in
LoadScaleRanges script. I'm not sure but perhaps this functionality
needs to be added to the Utilities script?

----
Timothy J Nolte - [hidden email]
Network Planning Engineer

iPCS Wireless, Inc.
4717 Broadmoor Ave, Suite G
Kentwood, MI 49512

Office: 616-656-5163
PCS:    616-706-2438
Fax:    616-554-6484
Web: www.ipcswirelessinc.com
-----Original Message-----
From: [hidden email]
[mailto:[hidden email]] On Behalf Of Paul Spencer
Sent: Monday, October 26, 2009 3:07 PM
To: Nolte, Tim
Cc: [hidden email]
Subject: Re: [fusion-users] MapServer Legend Icons

Ohhhhh - light goes on - doh!  You have 6 maps in the same map group!  
This will need a bit of work :)  We need to modify the scale_ranges  
array in the session so that it is subdivided by map name.  LoadMap  
needs to set

$_SESSION['scale_ranges'][$mapName]

and LoadScaleRanges needs to use the same thing when referencing it.  
Do you think you could make these changes and test?  If it works, I'll  
file the bug and commit.  If you don't want to try first, I can take a  
stab at it and commit but I'm not really set up to test right now.

Thanks Tim

Paul


On 2009-10-26, at 2:39 PM, Nolte, Tim wrote:

> What I am seeing with Firebug is that there are 6 calls to  
> LoadMap.php,
> which are my 5 main maps and 1 overview map. After the 5th LoadMap.php
> call then the LoadScaleRanges.php calls begin, there are 5 calls. One
> thing that I noticed also is that the MapTips are not working and what
> is being POSTed to the MapTip.php script is the wrong map for the  
> layer
> that I've selected for MapTips. Seems like there could be a problem  
> with
> using the SESSION if the LoadMap.php is not adding something to the
> SESSION to directly link the call to the LoadScaleRanges.php so that
> it's not pulling the wrong scale_ranges. Is there any debugging
> information that I can send?
>
> - Tim
>
> ----
> Timothy J Nolte - [hidden email]
> Network Planning Engineer
>
> iPCS Wireless, Inc.
> 4717 Broadmoor Ave, Suite G
> Kentwood, MI 49512
>
> Office: 616-656-5163
> PCS:    616-706-2438
> Fax:    616-554-6484
> Web: www.ipcswirelessinc.com
> -----Original Message-----
> From: [hidden email]
> [mailto:[hidden email]] On Behalf Of Paul  
> Spencer
> Sent: Monday, October 26, 2009 11:30 AM
> To: Nolte, Tim
> Cc: [hidden email]
> Subject: Re: [fusion-users] MapServer Legend Icons
>
> Hi Tim,
>
> The legend icon stuff is working in another project that Paul
> Deschamps is working on, he has multiple map files and a menu for
> changing between them.  The legend does appear to update correctly
> when changing maps.
>
> The way it *should* work is that LoadMap.php populates a session
> variable 'scale_ranges' with an array of each scale range of each
> class of each layer.  LoadScaleRanges.php uses this array to get the
> class for each scale range and draw the icon at the appropriate scale
> for that class and then combines them all into a single image, and
> returns a set of CSS offset values for use by the legend - so each
> scale range has the same image source but different offsets.
>
> I suspect what is going wrong is that the scale_ranges array is
> somehow the wrong one.  We need to know what sequence is causing
> this.  Is LoadScaleRanges being called before LoadMap finishes?  Or
> are you programmatically changing maps while loading them or between
> loading and calling LoadScaleRanges?
>
> Cheers
>
> Paul
>
>
> On 2009-10-26, at 10:38 AM, Nolte, Tim wrote:
>
>> Last week I had posted about a problem with my legend icons not
>> showing
>> up. I have multiple MapServer mapfiles defined. I'm not sure if the
>> problem I'm having is solely related to having multiple mapfiles or
>> that
>> I recently updated to the latest Fusion trunk. I can say that the
>> problem with the legend icons is because of an error in
>> layers\MapServer\php\LoadScaleRanges.php, the section that it is
>> having
>> a problem with is:
>>
>> $oImg = $oClass->createLegendIcon($nIconWidth, $nIconHeight);
>>
>> This is failing with the error:
>>
>> Fatal error: Call to a member function createLegendIcon() on a
>> non-object
>>
>> If I change the code to make sure that '$oClass' is not NULL then
>> legend
>> icons do get created but they are not being created correctly. I'm  
>> not
>> sure if this is something where I need to use a different built-in
>> function to use one of the default Fusion layer icons? If anyone has
>> any
>> ideas it would be a big help.
>>
>> - Tim
>>
>> ----
>> Timothy J Nolte - [hidden email]
>> Network Planning Engineer
>>
>> iPCS Wireless, Inc.
>> 4717 Broadmoor Ave, Suite G
>> Kentwood, MI 49512
>>
>> Office: 616-656-5163
>> PCS:    616-706-2438
>> Fax:    616-554-6484
>> Web: www.ipcswirelessinc.com
>> _______________________________________________
>> fusion-users mailing list
>> [hidden email]
>> http://lists.osgeo.org/mailman/listinfo/fusion-users
>
>
> __________________________________________
>
>    Paul Spencer
>    Chief Technology Officer
>    DM Solutions Group Inc
>    http://research.dmsolutions.ca/
>
> _______________________________________________
> fusion-users mailing list
> [hidden email]
> http://lists.osgeo.org/mailman/listinfo/fusion-users
>


__________________________________________

    Paul Spencer
    Chief Technology Officer
    DM Solutions Group Inc
    http://research.dmsolutions.ca/

_______________________________________________
fusion-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/fusion-users

_______________________________________________
fusion-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/fusion-users
Nolte, Tim

RE: MapServer Legend Icons

Reply Threaded More More options
Print post
Permalink
Is this forum and/or project dead? How many people are actually using
this or developing for it?

Well, on a good note I finally got a somewhat working solution by
basically forgetting about trying to rely on $_SESSION and basically
copied a bunch of the LoadMap code that sets up the Scale Ranges over to
the LoadScaleRanges script. I also changed the script to also not rely
on the $_SESSION to tell it what mapfile it is supposed to use and
basically copied the code in LoadMap that sets up the SESSION based map.
There is still the issue of the Legend being sorted backwards, the
Legend icons not all updating properly when zooming in, as well as an
issue with the map layers not being stacked in the right order. I'm
plugging away at this. It would be really nice if no one else is really
working on MapServer specific development that I could start submitting
to the SVN or somehow my changes could get approved to be taken into the
project. I'll hate to have to use a diff utility every time there is an
update and have to fix my code so that things still work. Thanks to
anyone that is actually reading this, if there is anyone out there.

- Tim

----
Timothy J Nolte - [hidden email]
Network Planning Engineer

iPCS Wireless, Inc.
4717 Broadmoor Ave, Suite G
Kentwood, MI 49512

Office: 616-656-5163
PCS:    616-706-2438
Fax:    616-554-6484
Web: www.ipcswirelessinc.com
-----Original Message-----
From: [hidden email]
[mailto:[hidden email]] On Behalf Of Nolte, Tim
Sent: Wednesday, November 04, 2009 4:08 PM
To: Paul Spencer
Cc: [hidden email]
Subject: RE: [fusion-users] MapServer Legend Icons

Paul,

I attempted this, however what I found was that the way the loading
process happens it is not enough to just stick the scale ranges into the
PHP $_SESSION. I'm finding that all of the individual maps in many cases
don't yet exist in the SESSION when the corresponding LoadScaleRanges is
called. Do you have any thoughts on how Fusion could be changed to only
call LoadScaleRanges 1 time after all of the LoadMap calls have
finished? I think this could be the fix. The only other option I see is
that the whole scale ranges creation process needs to be duplicated in
LoadScaleRanges script. I'm not sure but perhaps this functionality
needs to be added to the Utilities script?

----
Timothy J Nolte - [hidden email]
Network Planning Engineer

iPCS Wireless, Inc.
4717 Broadmoor Ave, Suite G
Kentwood, MI 49512

Office: 616-656-5163
PCS:    616-706-2438
Fax:    616-554-6484
Web: www.ipcswirelessinc.com
-----Original Message-----
From: [hidden email]
[mailto:[hidden email]] On Behalf Of Paul Spencer
Sent: Monday, October 26, 2009 3:07 PM
To: Nolte, Tim
Cc: [hidden email]
Subject: Re: [fusion-users] MapServer Legend Icons

Ohhhhh - light goes on - doh!  You have 6 maps in the same map group!  
This will need a bit of work :)  We need to modify the scale_ranges  
array in the session so that it is subdivided by map name.  LoadMap  
needs to set

$_SESSION['scale_ranges'][$mapName]

and LoadScaleRanges needs to use the same thing when referencing it.  
Do you think you could make these changes and test?  If it works, I'll  
file the bug and commit.  If you don't want to try first, I can take a  
stab at it and commit but I'm not really set up to test right now.

Thanks Tim

Paul


On 2009-10-26, at 2:39 PM, Nolte, Tim wrote:

> What I am seeing with Firebug is that there are 6 calls to  
> LoadMap.php,
> which are my 5 main maps and 1 overview map. After the 5th LoadMap.php
> call then the LoadScaleRanges.php calls begin, there are 5 calls. One
> thing that I noticed also is that the MapTips are not working and what
> is being POSTed to the MapTip.php script is the wrong map for the  
> layer
> that I've selected for MapTips. Seems like there could be a problem  
> with
> using the SESSION if the LoadMap.php is not adding something to the
> SESSION to directly link the call to the LoadScaleRanges.php so that
> it's not pulling the wrong scale_ranges. Is there any debugging
> information that I can send?
>
> - Tim
>
> ----
> Timothy J Nolte - [hidden email]
> Network Planning Engineer
>
> iPCS Wireless, Inc.
> 4717 Broadmoor Ave, Suite G
> Kentwood, MI 49512
>
> Office: 616-656-5163
> PCS:    616-706-2438
> Fax:    616-554-6484
> Web: www.ipcswirelessinc.com
> -----Original Message-----
> From: [hidden email]
> [mailto:[hidden email]] On Behalf Of Paul  
> Spencer
> Sent: Monday, October 26, 2009 11:30 AM
> To: Nolte, Tim
> Cc: [hidden email]
> Subject: Re: [fusion-users] MapServer Legend Icons
>
> Hi Tim,
>
> The legend icon stuff is working in another project that Paul
> Deschamps is working on, he has multiple map files and a menu for
> changing between them.  The legend does appear to update correctly
> when changing maps.
>
> The way it *should* work is that LoadMap.php populates a session
> variable 'scale_ranges' with an array of each scale range of each
> class of each layer.  LoadScaleRanges.php uses this array to get the
> class for each scale range and draw the icon at the appropriate scale
> for that class and then combines them all into a single image, and
> returns a set of CSS offset values for use by the legend - so each
> scale range has the same image source but different offsets.
>
> I suspect what is going wrong is that the scale_ranges array is
> somehow the wrong one.  We need to know what sequence is causing
> this.  Is LoadScaleRanges being called before LoadMap finishes?  Or
> are you programmatically changing maps while loading them or between
> loading and calling LoadScaleRanges?
>
> Cheers
>
> Paul
>
>
> On 2009-10-26, at 10:38 AM, Nolte, Tim wrote:
>
>> Last week I had posted about a problem with my legend icons not
>> showing
>> up. I have multiple MapServer mapfiles defined. I'm not sure if the
>> problem I'm having is solely related to having multiple mapfiles or
>> that
>> I recently updated to the latest Fusion trunk. I can say that the
>> problem with the legend icons is because of an error in
>> layers\MapServer\php\LoadScaleRanges.php, the section that it is
>> having
>> a problem with is:
>>
>> $oImg = $oClass->createLegendIcon($nIconWidth, $nIconHeight);
>>
>> This is failing with the error:
>>
>> Fatal error: Call to a member function createLegendIcon() on a
>> non-object
>>
>> If I change the code to make sure that '$oClass' is not NULL then
>> legend
>> icons do get created but they are not being created correctly. I'm  
>> not
>> sure if this is something where I need to use a different built-in
>> function to use one of the default Fusion layer icons? If anyone has
>> any
>> ideas it would be a big help.
>>
>> - Tim
>>
>> ----
>> Timothy J Nolte - [hidden email]
>> Network Planning Engineer
>>
>> iPCS Wireless, Inc.
>> 4717 Broadmoor Ave, Suite G
>> Kentwood, MI 49512
>>
>> Office: 616-656-5163
>> PCS:    616-706-2438
>> Fax:    616-554-6484
>> Web: www.ipcswirelessinc.com
>> _______________________________________________
>> fusion-users mailing list
>> [hidden email]
>> http://lists.osgeo.org/mailman/listinfo/fusion-users
>
>
> __________________________________________
>
>    Paul Spencer
>    Chief Technology Officer
>    DM Solutions Group Inc
>    http://research.dmsolutions.ca/
>
> _______________________________________________
> fusion-users mailing list
> [hidden email]
> http://lists.osgeo.org/mailman/listinfo/fusion-users
>


__________________________________________

    Paul Spencer
    Chief Technology Officer
    DM Solutions Group Inc
    http://research.dmsolutions.ca/

_______________________________________________
fusion-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/fusion-users

_______________________________________________
fusion-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/fusion-users

_______________________________________________
fusion-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/fusion-users
Paul Spencer-2

Re: MapServer Legend Icons

Reply Threaded More More options
Print post
Permalink
Hi Tim,

the project is not dead but I don't know how many folks are using it  
right now.  I know that MapGuide is actively using it and the Autodesk  
team there is actively finding and fixing bugs related to the MapGuide  
support.  DM Solutions is also actively using and developing the  
framework and the MapServer support.

I have added you as a committer, welcome aboard!

Cheers

Paul

On 2009-11-05, at 3:03 PM, Nolte, Tim wrote:

> Is this forum and/or project dead? How many people are actually using
> this or developing for it?
>
> Well, on a good note I finally got a somewhat working solution by
> basically forgetting about trying to rely on $_SESSION and basically
> copied a bunch of the LoadMap code that sets up the Scale Ranges  
> over to
> the LoadScaleRanges script. I also changed the script to also not rely
> on the $_SESSION to tell it what mapfile it is supposed to use and
> basically copied the code in LoadMap that sets up the SESSION based  
> map.
> There is still the issue of the Legend being sorted backwards, the
> Legend icons not all updating properly when zooming in, as well as an
> issue with the map layers not being stacked in the right order. I'm
> plugging away at this. It would be really nice if no one else is  
> really
> working on MapServer specific development that I could start  
> submitting
> to the SVN or somehow my changes could get approved to be taken into  
> the
> project. I'll hate to have to use a diff utility every time there is  
> an
> update and have to fix my code so that things still work. Thanks to
> anyone that is actually reading this, if there is anyone out there.
>
> - Tim
>
> ----
> Timothy J Nolte - [hidden email]
> Network Planning Engineer
>
> iPCS Wireless, Inc.
> 4717 Broadmoor Ave, Suite G
> Kentwood, MI 49512
>
> Office: 616-656-5163
> PCS:    616-706-2438
> Fax:    616-554-6484
> Web: www.ipcswirelessinc.com
> -----Original Message-----
> From: [hidden email]
> [mailto:[hidden email]] On Behalf Of Nolte, Tim
> Sent: Wednesday, November 04, 2009 4:08 PM
> To: Paul Spencer
> Cc: [hidden email]
> Subject: RE: [fusion-users] MapServer Legend Icons
>
> Paul,
>
> I attempted this, however what I found was that the way the loading
> process happens it is not enough to just stick the scale ranges into  
> the
> PHP $_SESSION. I'm finding that all of the individual maps in many  
> cases
> don't yet exist in the SESSION when the corresponding  
> LoadScaleRanges is
> called. Do you have any thoughts on how Fusion could be changed to  
> only
> call LoadScaleRanges 1 time after all of the LoadMap calls have
> finished? I think this could be the fix. The only other option I see  
> is
> that the whole scale ranges creation process needs to be duplicated in
> LoadScaleRanges script. I'm not sure but perhaps this functionality
> needs to be added to the Utilities script?
>
> ----
> Timothy J Nolte - [hidden email]
> Network Planning Engineer
>
> iPCS Wireless, Inc.
> 4717 Broadmoor Ave, Suite G
> Kentwood, MI 49512
>
> Office: 616-656-5163
> PCS:    616-706-2438
> Fax:    616-554-6484
> Web: www.ipcswirelessinc.com
> -----Original Message-----
> From: [hidden email]
> [mailto:[hidden email]] On Behalf Of Paul  
> Spencer
> Sent: Monday, October 26, 2009 3:07 PM
> To: Nolte, Tim
> Cc: [hidden email]
> Subject: Re: [fusion-users] MapServer Legend Icons
>
> Ohhhhh - light goes on - doh!  You have 6 maps in the same map group!
> This will need a bit of work :)  We need to modify the scale_ranges
> array in the session so that it is subdivided by map name.  LoadMap
> needs to set
>
> $_SESSION['scale_ranges'][$mapName]
>
> and LoadScaleRanges needs to use the same thing when referencing it.
> Do you think you could make these changes and test?  If it works, I'll
> file the bug and commit.  If you don't want to try first, I can take a
> stab at it and commit but I'm not really set up to test right now.
>
> Thanks Tim
>
> Paul
>
>
> On 2009-10-26, at 2:39 PM, Nolte, Tim wrote:
>
>> What I am seeing with Firebug is that there are 6 calls to
>> LoadMap.php,
>> which are my 5 main maps and 1 overview map. After the 5th  
>> LoadMap.php
>> call then the LoadScaleRanges.php calls begin, there are 5 calls. One
>> thing that I noticed also is that the MapTips are not working and  
>> what
>> is being POSTed to the MapTip.php script is the wrong map for the
>> layer
>> that I've selected for MapTips. Seems like there could be a problem
>> with
>> using the SESSION if the LoadMap.php is not adding something to the
>> SESSION to directly link the call to the LoadScaleRanges.php so that
>> it's not pulling the wrong scale_ranges. Is there any debugging
>> information that I can send?
>>
>> - Tim
>>
>> ----
>> Timothy J Nolte - [hidden email]
>> Network Planning Engineer
>>
>> iPCS Wireless, Inc.
>> 4717 Broadmoor Ave, Suite G
>> Kentwood, MI 49512
>>
>> Office: 616-656-5163
>> PCS:    616-706-2438
>> Fax:    616-554-6484
>> Web: www.ipcswirelessinc.com
>> -----Original Message-----
>> From: [hidden email]
>> [mailto:[hidden email]] On Behalf Of Paul
>> Spencer
>> Sent: Monday, October 26, 2009 11:30 AM
>> To: Nolte, Tim
>> Cc: [hidden email]
>> Subject: Re: [fusion-users] MapServer Legend Icons
>>
>> Hi Tim,
>>
>> The legend icon stuff is working in another project that Paul
>> Deschamps is working on, he has multiple map files and a menu for
>> changing between them.  The legend does appear to update correctly
>> when changing maps.
>>
>> The way it *should* work is that LoadMap.php populates a session
>> variable 'scale_ranges' with an array of each scale range of each
>> class of each layer.  LoadScaleRanges.php uses this array to get the
>> class for each scale range and draw the icon at the appropriate scale
>> for that class and then combines them all into a single image, and
>> returns a set of CSS offset values for use by the legend - so each
>> scale range has the same image source but different offsets.
>>
>> I suspect what is going wrong is that the scale_ranges array is
>> somehow the wrong one.  We need to know what sequence is causing
>> this.  Is LoadScaleRanges being called before LoadMap finishes?  Or
>> are you programmatically changing maps while loading them or between
>> loading and calling LoadScaleRanges?
>>
>> Cheers
>>
>> Paul
>>
>>
>> On 2009-10-26, at 10:38 AM, Nolte, Tim wrote:
>>
>>> Last week I had posted about a problem with my legend icons not
>>> showing
>>> up. I have multiple MapServer mapfiles defined. I'm not sure if the
>>> problem I'm having is solely related to having multiple mapfiles or
>>> that
>>> I recently updated to the latest Fusion trunk. I can say that the
>>> problem with the legend icons is because of an error in
>>> layers\MapServer\php\LoadScaleRanges.php, the section that it is
>>> having
>>> a problem with is:
>>>
>>> $oImg = $oClass->createLegendIcon($nIconWidth, $nIconHeight);
>>>
>>> This is failing with the error:
>>>
>>> Fatal error: Call to a member function createLegendIcon() on a
>>> non-object
>>>
>>> If I change the code to make sure that '$oClass' is not NULL then
>>> legend
>>> icons do get created but they are not being created correctly. I'm
>>> not
>>> sure if this is something where I need to use a different built-in
>>> function to use one of the default Fusion layer icons? If anyone has
>>> any
>>> ideas it would be a big help.
>>>
>>> - Tim
>>>
>>> ----
>>> Timothy J Nolte - [hidden email]
>>> Network Planning Engineer
>>>
>>> iPCS Wireless, Inc.
>>> 4717 Broadmoor Ave, Suite G
>>> Kentwood, MI 49512
>>>
>>> Office: 616-656-5163
>>> PCS:    616-706-2438
>>> Fax:    616-554-6484
>>> Web: www.ipcswirelessinc.com
>>> _______________________________________________
>>> fusion-users mailing list
>>> [hidden email]
>>> http://lists.osgeo.org/mailman/listinfo/fusion-users
>>
>>
>> __________________________________________
>>
>>   Paul Spencer
>>   Chief Technology Officer
>>   DM Solutions Group Inc
>>   http://research.dmsolutions.ca/
>>
>> _______________________________________________
>> fusion-users mailing list
>> [hidden email]
>> http://lists.osgeo.org/mailman/listinfo/fusion-users
>>
>
>
> __________________________________________
>
>    Paul Spencer
>    Chief Technology Officer
>    DM Solutions Group Inc
>    http://research.dmsolutions.ca/
>
> _______________________________________________
> fusion-users mailing list
> [hidden email]
> http://lists.osgeo.org/mailman/listinfo/fusion-users
>
> _______________________________________________
> fusion-users mailing list
> [hidden email]
> http://lists.osgeo.org/mailman/listinfo/fusion-users
>
> _______________________________________________
> fusion-users mailing list
> [hidden email]
> http://lists.osgeo.org/mailman/listinfo/fusion-users


__________________________________________

    Paul Spencer
    Chief Technology Officer
    DM Solutions Group Inc
    http://research.dmsolutions.ca/

_______________________________________________
fusion-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/fusion-users
Nolte, Tim

RE: MapServer Legend Icons

Reply Threaded More More options
Print post
Permalink
Paul,

Excellent! Thank you very much. I've making some good head way on the
whole Legend issue, especially when using multiple maps within a map
group. I'm going to switch over to a single map in the map group and see
what results I get also. I'm happy to be able to submit changes to the
MapServer side of the project. I hope that my work will help others that
are already using MapServer adopt Fusion as their framework of choice.

- Tim

----
Timothy J Nolte - [hidden email]
Network Planning Engineer

iPCS Wireless, Inc.
4717 Broadmoor Ave, Suite G
Kentwood, MI 49512

Office: 616-656-5163
PCS:    616-706-2438
Fax:    616-554-6484
Web: www.ipcswirelessinc.com
-----Original Message-----
From: Paul Spencer [mailto:[hidden email]]
Sent: Thursday, November 05, 2009 3:46 PM
To: Nolte, Tim
Cc: [hidden email]
Subject: Re: [fusion-users] MapServer Legend Icons

Hi Tim,

the project is not dead but I don't know how many folks are using it  
right now.  I know that MapGuide is actively using it and the Autodesk  
team there is actively finding and fixing bugs related to the MapGuide  
support.  DM Solutions is also actively using and developing the  
framework and the MapServer support.

I have added you as a committer, welcome aboard!

Cheers

Paul

On 2009-11-05, at 3:03 PM, Nolte, Tim wrote:

> Is this forum and/or project dead? How many people are actually using
> this or developing for it?
>
> Well, on a good note I finally got a somewhat working solution by
> basically forgetting about trying to rely on $_SESSION and basically
> copied a bunch of the LoadMap code that sets up the Scale Ranges  
> over to
> the LoadScaleRanges script. I also changed the script to also not rely
> on the $_SESSION to tell it what mapfile it is supposed to use and
> basically copied the code in LoadMap that sets up the SESSION based  
> map.
> There is still the issue of the Legend being sorted backwards, the
> Legend icons not all updating properly when zooming in, as well as an
> issue with the map layers not being stacked in the right order. I'm
> plugging away at this. It would be really nice if no one else is  
> really
> working on MapServer specific development that I could start  
> submitting
> to the SVN or somehow my changes could get approved to be taken into  
> the
> project. I'll hate to have to use a diff utility every time there is  
> an
> update and have to fix my code so that things still work. Thanks to
> anyone that is actually reading this, if there is anyone out there.
>
> - Tim
>
> ----
> Timothy J Nolte - [hidden email]
> Network Planning Engineer
>
> iPCS Wireless, Inc.
> 4717 Broadmoor Ave, Suite G
> Kentwood, MI 49512
>
> Office: 616-656-5163
> PCS:    616-706-2438
> Fax:    616-554-6484
> Web: www.ipcswirelessinc.com
> -----Original Message-----
> From: [hidden email]
> [mailto:[hidden email]] On Behalf Of Nolte, Tim
> Sent: Wednesday, November 04, 2009 4:08 PM
> To: Paul Spencer
> Cc: [hidden email]
> Subject: RE: [fusion-users] MapServer Legend Icons
>
> Paul,
>
> I attempted this, however what I found was that the way the loading
> process happens it is not enough to just stick the scale ranges into  
> the
> PHP $_SESSION. I'm finding that all of the individual maps in many  
> cases
> don't yet exist in the SESSION when the corresponding  
> LoadScaleRanges is
> called. Do you have any thoughts on how Fusion could be changed to  
> only
> call LoadScaleRanges 1 time after all of the LoadMap calls have
> finished? I think this could be the fix. The only other option I see  
> is
> that the whole scale ranges creation process needs to be duplicated in
> LoadScaleRanges script. I'm not sure but perhaps this functionality
> needs to be added to the Utilities script?
>
> ----
> Timothy J Nolte - [hidden email]
> Network Planning Engineer
>
> iPCS Wireless, Inc.
> 4717 Broadmoor Ave, Suite G
> Kentwood, MI 49512
>
> Office: 616-656-5163
> PCS:    616-706-2438
> Fax:    616-554-6484
> Web: www.ipcswirelessinc.com
> -----Original Message-----
> From: [hidden email]
> [mailto:[hidden email]] On Behalf Of Paul  
> Spencer
> Sent: Monday, October 26, 2009 3:07 PM
> To: Nolte, Tim
> Cc: [hidden email]
> Subject: Re: [fusion-users] MapServer Legend Icons
>
> Ohhhhh - light goes on - doh!  You have 6 maps in the same map group!
> This will need a bit of work :)  We need to modify the scale_ranges
> array in the session so that it is subdivided by map name.  LoadMap
> needs to set
>
> $_SESSION['scale_ranges'][$mapName]
>
> and LoadScaleRanges needs to use the same thing when referencing it.
> Do you think you could make these changes and test?  If it works, I'll
> file the bug and commit.  If you don't want to try first, I can take a
> stab at it and commit but I'm not really set up to test right now.
>
> Thanks Tim
>
> Paul
>
>
> On 2009-10-26, at 2:39 PM, Nolte, Tim wrote:
>
>> What I am seeing with Firebug is that there are 6 calls to
>> LoadMap.php,
>> which are my 5 main maps and 1 overview map. After the 5th  
>> LoadMap.php
>> call then the LoadScaleRanges.php calls begin, there are 5 calls. One
>> thing that I noticed also is that the MapTips are not working and  
>> what
>> is being POSTed to the MapTip.php script is the wrong map for the
>> layer
>> that I've selected for MapTips. Seems like there could be a problem
>> with
>> using the SESSION if the LoadMap.php is not adding something to the
>> SESSION to directly link the call to the LoadScaleRanges.php so that
>> it's not pulling the wrong scale_ranges. Is there any debugging
>> information that I can send?
>>
>> - Tim
>>
>> ----
>> Timothy J Nolte - [hidden email]
>> Network Planning Engineer
>>
>> iPCS Wireless, Inc.
>> 4717 Broadmoor Ave, Suite G
>> Kentwood, MI 49512
>>
>> Office: 616-656-5163
>> PCS:    616-706-2438
>> Fax:    616-554-6484
>> Web: www.ipcswirelessinc.com
>> -----Original Message-----
>> From: [hidden email]
>> [mailto:[hidden email]] On Behalf Of Paul
>> Spencer
>> Sent: Monday, October 26, 2009 11:30 AM
>> To: Nolte, Tim
>> Cc: [hidden email]
>> Subject: Re: [fusion-users] MapServer Legend Icons
>>
>> Hi Tim,
>>
>> The legend icon stuff is working in another project that Paul
>> Deschamps is working on, he has multiple map files and a menu for
>> changing between them.  The legend does appear to update correctly
>> when changing maps.
>>
>> The way it *should* work is that LoadMap.php populates a session
>> variable 'scale_ranges' with an array of each scale range of each
>> class of each layer.  LoadScaleRanges.php uses this array to get the
>> class for each scale range and draw the icon at the appropriate scale
>> for that class and then combines them all into a single image, and
>> returns a set of CSS offset values for use by the legend - so each
>> scale range has the same image source but different offsets.
>>
>> I suspect what is going wrong is that the scale_ranges array is
>> somehow the wrong one.  We need to know what sequence is causing
>> this.  Is LoadScaleRanges being called before LoadMap finishes?  Or
>> are you programmatically changing maps while loading them or between
>> loading and calling LoadScaleRanges?
>>
>> Cheers
>>
>> Paul
>>
>>
>> On 2009-10-26, at 10:38 AM, Nolte, Tim wrote:
>>
>>> Last week I had posted about a problem with my legend icons not
>>> showing
>>> up. I have multiple MapServer mapfiles defined. I'm not sure if the
>>> problem I'm having is solely related to having multiple mapfiles or
>>> that
>>> I recently updated to the latest Fusion trunk. I can say that the
>>> problem with the legend icons is because of an error in
>>> layers\MapServer\php\LoadScaleRanges.php, the section that it is
>>> having
>>> a problem with is:
>>>
>>> $oImg = $oClass->createLegendIcon($nIconWidth, $nIconHeight);
>>>
>>> This is failing with the error:
>>>
>>> Fatal error: Call to a member function createLegendIcon() on a
>>> non-object
>>>
>>> If I change the code to make sure that '$oClass' is not NULL then
>>> legend
>>> icons do get created but they are not being created correctly. I'm
>>> not
>>> sure if this is something where I need to use a different built-in
>>> function to use one of the default Fusion layer icons? If anyone has
>>> any
>>> ideas it would be a big help.
>>>
>>> - Tim
>>>
>>> ----
>>> Timothy J Nolte - [hidden email]
>>> Network Planning Engineer
>>>
>>> iPCS Wireless, Inc.
>>> 4717 Broadmoor Ave, Suite G
>>> Kentwood, MI 49512
>>>
>>> Office: 616-656-5163
>>> PCS:    616-706-2438
>>> Fax:    616-554-6484
>>> Web: www.ipcswirelessinc.com
>>> _______________________________________________
>>> fusion-users mailing list
>>> [hidden email]
>>> http://lists.osgeo.org/mailman/listinfo/fusion-users
>>
>>
>> __________________________________________
>>
>>   Paul Spencer
>>   Chief Technology Officer
>>   DM Solutions Group Inc
>>   http://research.dmsolutions.ca/
>>
>> _______________________________________________
>> fusion-users mailing list
>> [hidden email]
>> http://lists.osgeo.org/mailman/listinfo/fusion-users
>>
>
>
> __________________________________________
>
>    Paul Spencer
>    Chief Technology Officer
>    DM Solutions Group Inc
>    http://research.dmsolutions.ca/
>
> _______________________________________________
> fusion-users mailing list
> [hidden email]
> http://lists.osgeo.org/mailman/listinfo/fusion-users
>
> _______________________________________________
> fusion-users mailing list
> [hidden email]
> http://lists.osgeo.org/mailman/listinfo/fusion-users
>
> _______________________________________________
> fusion-users mailing list
> [hidden email]
> http://lists.osgeo.org/mailman/listinfo/fusion-users


__________________________________________

    Paul Spencer
    Chief Technology Officer
    DM Solutions Group Inc
    http://research.dmsolutions.ca/


_______________________________________________
fusion-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/fusion-users
Paul Deschamps

Re: MapServer Legend Icons

Reply Threaded More More options
Print post
Permalink
Hi Tim,

Welcome to the project. If your interested you can also download a live cd of MapGuide Open source. (http://mapguide.osgeo.org/node/127) and run it in vmware. If your interested. It's a nice way to see how fusion works with both platforms and it will help to make sure that when you fix an issue on one platform that it doesn't expose an issue on the other so it's a good idea to have setup anyhow.

Cheers

Paul D (Not Paul S) :)

On Thu, Nov 5, 2009 at 4:33 PM, Nolte, Tim <[hidden email]> wrote:
Paul,

Excellent! Thank you very much. I've making some good head way on the
whole Legend issue, especially when using multiple maps within a map
group. I'm going to switch over to a single map in the map group and see
what results I get also. I'm happy to be able to submit changes to the
MapServer side of the project. I hope that my work will help others that
are already using MapServer adopt Fusion as their framework of choice.

- Tim

----
Timothy J Nolte - [hidden email]
Network Planning Engineer

iPCS Wireless, Inc.
4717 Broadmoor Ave, Suite G
Kentwood, MI 49512

Office: 616-656-5163
PCS:    616-706-2438
Fax:    616-554-6484
Web: www.ipcswirelessinc.com
-----Original Message-----
From: Paul Spencer [mailto:[hidden email]]
Sent: Thursday, November 05, 2009 3:46 PM
To: Nolte, Tim
Cc: [hidden email]
Subject: Re: [fusion-users] MapServer Legend Icons

Hi Tim,

the project is not dead but I don't know how many folks are using it
right now.  I know that MapGuide is actively using it and the Autodesk
team there is actively finding and fixing bugs related to the MapGuide
support.  DM Solutions is also actively using and developing the
framework and the MapServer support.

I have added you as a committer, welcome aboard!

Cheers

Paul

On 2009-11-05, at 3:03 PM, Nolte, Tim wrote:

> Is this forum and/or project dead? How many people are actually using
> this or developing for it?
>
> Well, on a good note I finally got a somewhat working solution by
> basically forgetting about trying to rely on $_SESSION and basically
> copied a bunch of the LoadMap code that sets up the Scale Ranges
> over to
> the LoadScaleRanges script. I also changed the script to also not rely
> on the $_SESSION to tell it what mapfile it is supposed to use and
> basically copied the code in LoadMap that sets up the SESSION based
> map.
> There is still the issue of the Legend being sorted backwards, the
> Legend icons not all updating properly when zooming in, as well as an
> issue with the map layers not being stacked in the right order. I'm
> plugging away at this. It would be really nice if no one else is
> really
> working on MapServer specific development that I could start
> submitting
> to the SVN or somehow my changes could get approved to be taken into
> the
> project. I'll hate to have to use a diff utility every time there is
> an
> update and have to fix my code so that things still work. Thanks to
> anyone that is actually reading this, if there is anyone out there.
>
> - Tim
>
> ----
> Timothy J Nolte - [hidden email]
> Network Planning Engineer
>
> iPCS Wireless, Inc.
> 4717 Broadmoor Ave, Suite G
> Kentwood, MI 49512
>
> Office: 616-656-5163
> PCS:    616-706-2438
> Fax:    616-554-6484
> Web: www.ipcswirelessinc.com
> -----Original Message-----
> From: [hidden email]
> [mailto:[hidden email]] On Behalf Of Nolte, Tim
> Sent: Wednesday, November 04, 2009 4:08 PM
> To: Paul Spencer
> Cc: [hidden email]
> Subject: RE: [fusion-users] MapServer Legend Icons
>
> Paul,
>
> I attempted this, however what I found was that the way the loading
> process happens it is not enough to just stick the scale ranges into
> the
> PHP $_SESSION. I'm finding that all of the individual maps in many
> cases
> don't yet exist in the SESSION when the corresponding
> LoadScaleRanges is
> called. Do you have any thoughts on how Fusion could be changed to
> only
> call LoadScaleRanges 1 time after all of the LoadMap calls have
> finished? I think this could be the fix. The only other option I see
> is
> that the whole scale ranges creation process needs to be duplicated in
> LoadScaleRanges script. I'm not sure but perhaps this functionality
> needs to be added to the Utilities script?
>
> ----
> Timothy J Nolte - [hidden email]
> Network Planning Engineer
>
> iPCS Wireless, Inc.
> 4717 Broadmoor Ave, Suite G
> Kentwood, MI 49512
>
> Office: 616-656-5163
> PCS:    616-706-2438
> Fax:    616-554-6484
> Web: www.ipcswirelessinc.com
> -----Original Message-----
> From: [hidden email]
> [mailto:[hidden email]] On Behalf Of Paul
> Spencer
> Sent: Monday, October 26, 2009 3:07 PM
> To: Nolte, Tim
> Cc: [hidden email]
> Subject: Re: [fusion-users] MapServer Legend Icons
>
> Ohhhhh - light goes on - doh!  You have 6 maps in the same map group!
> This will need a bit of work :)  We need to modify the scale_ranges
> array in the session so that it is subdivided by map name.  LoadMap
> needs to set
>
> $_SESSION['scale_ranges'][$mapName]
>
> and LoadScaleRanges needs to use the same thing when referencing it.
> Do you think you could make these changes and test?  If it works, I'll
> file the bug and commit.  If you don't want to try first, I can take a
> stab at it and commit but I'm not really set up to test right now.
>
> Thanks Tim
>
> Paul
>
>
> On 2009-10-26, at 2:39 PM, Nolte, Tim wrote:
>
>> What I am seeing with Firebug is that there are 6 calls to
>> LoadMap.php,
>> which are my 5 main maps and 1 overview map. After the 5th
>> LoadMap.php
>> call then the LoadScaleRanges.php calls begin, there are 5 calls. One
>> thing that I noticed also is that the MapTips are not working and
>> what
>> is being POSTed to the MapTip.php script is the wrong map for the
>> layer
>> that I've selected for MapTips. Seems like there could be a problem
>> with
>> using the SESSION if the LoadMap.php is not adding something to the
>> SESSION to directly link the call to the LoadScaleRanges.php so that
>> it's not pulling the wrong scale_ranges. Is there any debugging
>> information that I can send?
>>
>> - Tim
>>
>> ----
>> Timothy J Nolte - [hidden email]
>> Network Planning Engineer
>>
>> iPCS Wireless, Inc.
>> 4717 Broadmoor Ave, Suite G
>> Kentwood, MI 49512
>>
>> Office: 616-656-5163
>> PCS:    616-706-2438
>> Fax:    616-554-6484
>> Web: www.ipcswirelessinc.com
>> -----Original Message-----
>> From: [hidden email]
>> [mailto:[hidden email]] On Behalf Of Paul
>> Spencer
>> Sent: Monday, October 26, 2009 11:30 AM
>> To: Nolte, Tim
>> Cc: [hidden email]
>> Subject: Re: [fusion-users] MapServer Legend Icons
>>
>> Hi Tim,
>>
>> The legend icon stuff is working in another project that Paul
>> Deschamps is working on, he has multiple map files and a menu for
>> changing between them.  The legend does appear to update correctly
>> when changing maps.
>>
>> The way it *should* work is that LoadMap.php populates a session
>> variable 'scale_ranges' with an array of each scale range of each
>> class of each layer.  LoadScaleRanges.php uses this array to get the
>> class for each scale range and draw the icon at the appropriate scale
>> for that class and then combines them all into a single image, and
>> returns a set of CSS offset values for use by the legend - so each
>> scale range has the same image source but different offsets.
>>
>> I suspect what is going wrong is that the scale_ranges array is
>> somehow the wrong one.  We need to know what sequence is causing
>> this.  Is LoadScaleRanges being called before LoadMap finishes?  Or
>> are you programmatically changing maps while loading them or between
>> loading and calling LoadScaleRanges?
>>
>> Cheers
>>
>> Paul
>>
>>
>> On 2009-10-26, at 10:38 AM, Nolte, Tim wrote:
>>
>>> Last week I had posted about a problem with my legend icons not
>>> showing
>>> up. I have multiple MapServer mapfiles defined. I'm not sure if the
>>> problem I'm having is solely related to having multiple mapfiles or
>>> that
>>> I recently updated to the latest Fusion trunk. I can say that the
>>> problem with the legend icons is because of an error in
>>> layers\MapServer\php\LoadScaleRanges.php, the section that it is
>>> having
>>> a problem with is:
>>>
>>>     $oImg = $oClass->createLegendIcon($nIconWidth, $nIconHeight);
>>>
>>> This is failing with the error:
>>>
>>>     Fatal error: Call to a member function createLegendIcon() on a
>>> non-object
>>>
>>> If I change the code to make sure that '$oClass' is not NULL then
>>> legend
>>> icons do get created but they are not being created correctly. I'm
>>> not
>>> sure if this is something where I need to use a different built-in
>>> function to use one of the default Fusion layer icons? If anyone has
>>> any
>>> ideas it would be a big help.
>>>
>>> - Tim
>>>
>>> ----
>>> Timothy J Nolte - [hidden email]
>>> Network Planning Engineer
>>>
>>> iPCS Wireless, Inc.
>>> 4717 Broadmoor Ave, Suite G
>>> Kentwood, MI 49512
>>>
>>> Office: 616-656-5163
>>> PCS:    616-706-2438
>>> Fax:    616-554-6484
>>> Web: www.ipcswirelessinc.com
>>> _______________________________________________
>>> fusion-users mailing list
>>> [hidden email]
>>> http://lists.osgeo.org/mailman/listinfo/fusion-users
>>
>>
>> __________________________________________
>>
>>   Paul Spencer
>>   Chief Technology Officer
>>   DM Solutions Group Inc
>>   http://research.dmsolutions.ca/
>>
>> _______________________________________________
>> fusion-users mailing list
>> [hidden email]
>> http://lists.osgeo.org/mailman/listinfo/fusion-users
>>
>
>
> __________________________________________
>
>    Paul Spencer
>    Chief Technology Officer
>    DM Solutions Group Inc
>    http://research.dmsolutions.ca/
>
> _______________________________________________
> fusion-users mailing list
> [hidden email]
> http://lists.osgeo.org/mailman/listinfo/fusion-users
>
> _______________________________________________
> fusion-users mailing list
> [hidden email]
> http://lists.osgeo.org/mailman/listinfo/fusion-users
>
> _______________________________________________
> fusion-users mailing list
> [hidden email]
> http://lists.osgeo.org/mailman/listinfo/fusion-users


__________________________________________

   Paul Spencer
   Chief Technology Officer
   DM Solutions Group Inc
   http://research.dmsolutions.ca/


_______________________________________________
fusion-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/fusion-users



--
   Paul Deschamps
   Applications Specialist
   DM Solutions Group Inc.

   Office: (613) 565-5056 x28
   [hidden email]
   http://www.dmsolutions.ca
   http://research.dmsolutions.ca
   


_______________________________________________
fusion-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/fusion-users