[fusion-dev] RE: [fusion-users] MapServer Legend Icons
Paul Spencer
pspencer at dmsolutions.ca
Fri Nov 6 09:46:18 EST 2009
Tim,
there never seems like enough time for stuff like this :) The coding
standard, such as it is, is a mix of current best practices and is not
entirely consistent. All contributions will be well received but we
provide some (hopefully constructive) criticism. The thing I like
about svn is changes can always be backed out if necessary so I always
encourage folks to commit what they have and then we can all test/
review.
Cheers
Paul
On 2009-11-06, at 9:33 AM, Nolte, Tim wrote:
> Thanks Paul for the welcome and the advice for getting a MapGuide
> install setup for testing. I'm really looking forward to
> contributing to
> the project. I was on the site looking for guidelines and didn't find
> anything. You do have some pages up but there is not content yet. Does
> anyone have any recommendations or best practices that I should be
> aware
> of? I just want to make sure that I meet any standards that have been
> set and that my contributions are received well. Thanks.
>
> - Tim
>
> ----
> Timothy J Nolte - tnolte at ilpcs.com
> 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: pdescham49 at gmail.com [mailto:pdescham49 at gmail.com] On Behalf Of
> Paul Deschamps
> Sent: Thursday, November 05, 2009 7:27 PM
> To: Nolte, Tim
> Cc: Paul Spencer; fusion-users at lists.osgeo.org
> Subject: Re: [fusion-users] MapServer Legend Icons
>
> 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
> <Tim.Nolte at ipcswirelessinc.com> 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 - tnolte at ilpcs.com
> 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:pspencer at dmsolutions.ca]
> Sent: Thursday, November 05, 2009 3:46 PM
> To: Nolte, Tim
> Cc: fusion-users at lists.osgeo.org
> 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 - tnolte at ilpcs.com
> > 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: fusion-users-bounces at lists.osgeo.org
> > [mailto:fusion-users-bounces at lists.osgeo.org] On Behalf Of
> Nolte, Tim
> > Sent: Wednesday, November 04, 2009 4:08 PM
> > To: Paul Spencer
> > Cc: fusion-users at lists.osgeo.org
> > 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 - tnolte at ilpcs.com
> > 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: fusion-users-bounces at lists.osgeo.org
> > [mailto:fusion-users-bounces at lists.osgeo.org] On Behalf Of
> Paul
> > Spencer
> > Sent: Monday, October 26, 2009 3:07 PM
> > To: Nolte, Tim
> > Cc: fusion-users at lists.osgeo.org
> > 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 - tnolte at ilpcs.com
> >> 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: fusion-users-bounces at lists.osgeo.org
> >> [mailto:fusion-users-bounces at lists.osgeo.org] On Behalf Of
> Paul
> >> Spencer
> >> Sent: Monday, October 26, 2009 11:30 AM
> >> To: Nolte, Tim
> >> Cc: fusion-users at lists.osgeo.org
> >> 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 - tnolte at ilpcs.com
> >>> 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
> >>> fusion-users at lists.osgeo.org
> >>> 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
> >> fusion-users at lists.osgeo.org
> >> 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
> > fusion-users at lists.osgeo.org
> > http://lists.osgeo.org/mailman/listinfo/fusion-users
> >
> > _______________________________________________
> > fusion-users mailing list
> > fusion-users at lists.osgeo.org
> > http://lists.osgeo.org/mailman/listinfo/fusion-users
> >
> > _______________________________________________
> > fusion-users mailing list
> > fusion-users at lists.osgeo.org
> > 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
> fusion-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/fusion-users
>
>
>
>
>
> --
> Paul Deschamps
> Applications Specialist
> DM Solutions Group Inc.
>
> Office: (613) 565-5056 x28
> pdeschamps at dmsolutions.ca
> http://www.dmsolutions.ca
> http://research.dmsolutions.ca
>
>
>
> _______________________________________________
> fusion-dev mailing list
> fusion-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/fusion-dev
__________________________________________
Paul Spencer
Chief Technology Officer
DM Solutions Group Inc
http://research.dmsolutions.ca/
More information about the fusion-dev
mailing list