PanQuery and pink backgrounds

31 messages Options
Embed this post
Permalink
1 2
Marc Pfister

PanQuery and pink backgrounds

Reply Threaded More More options
Print post
Permalink
Some javascript/style in this post has been disabled (why?)

Two questions:

 

1.       Does the PanQuery widget work for anyone? When I add it to applicationdefinition.xml, it shows up as two buttons in the toolbar, both with the same “hand” icon. The first on is greyed out, the second isn’t but can’t be selected.

 

2.       Has anyone run into a case where some image in the OpenLayers stack fails to load and instead returns a pink background and the broken image icon at top left? We can occasionally make it happen with some aggressive mousewheel work. The fun part is that the pink remains as a background for all successive pans and zooms. I know OpenLayers is making the pink tile and I can certainly just have it use white once the site is in production, but I’m not really sure why it persists after pan and zoom redraws.

 

n
Marc Pfister
Geospatial Data Manager
ENPLAN
[hidden email]
530/221-0440 x108
530/221-6963 Fax

 


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

RE: PanQuery and pink backgrounds

Reply Threaded More More options
Print post
Permalink
Some javascript/style in this post has been disabled (why?)

I’ve seen #2 as well.  Not sure what causes it, and agree that it’s annoying.  It would be better if it didn’t happen in the first place, but if it’s caused by a transitory server error or browser issue, it would be nice if there was a retry queue.

 

Jason

 

From: Marc Pfister
Subject: [fusion-users] PanQuery and pink backgrounds

 

 

1.       Has anyone run into a case where some image in the OpenLayers stack fails to load and instead returns a pink background and the broken image icon at top left? We can occasionally make it happen with some aggressive mousewheel work. The fun part is that the pink remains as a background for all successive pans and zooms. I know OpenLayers is making the pink tile and I can certainly just have it use white once the site is in production, but I’m not really sure why it persists after pan and zoom redraws.

 


_______________________________________________
fusion-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/fusion-users
Kenneth Skovhede, GEOGRAF A/S

Re: PanQuery and pink backgrounds

Reply Threaded More More options
Print post
Permalink
Some javascript/style in this post has been disabled (why?)
Since Fusion uses OpenLayers, there is an option to retry:
OpenLayers.IMAGE_RELOAD_ATTEMPTS = 3;

How you set that in Fusion, I don't know.
OpenLayers 2.5 seems to have a bug in how it tries to reload, but 2.6 should be good.
Regards, Kenneth Skovhede, GEOGRAF A/S


Jason Birch skrev:

I’ve seen #2 as well.  Not sure what causes it, and agree that it’s annoying.  It would be better if it didn’t happen in the first place, but if it’s caused by a transitory server error or browser issue, it would be nice if there was a retry queue.

 

Jason

 

From: Marc Pfister
Subject: [fusion-users] PanQuery and pink backgrounds

 

 

1.       Has anyone run into a case where some image in the OpenLayers stack fails to load and instead returns a pink background and the broken image icon at top left? We can occasionally make it happen with some aggressive mousewheel work. The fun part is that the pink remains as a background for all successive pans and zooms. I know OpenLayers is making the pink tile and I can certainly just have it use white once the site is in production, but I’m not really sure why it persists after pan and zoom redraws.

 


_______________________________________________ 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
zspitzer

Re: PanQuery and pink backgrounds

Reply Threaded More More options
Print post
Permalink
there was something on the OL lists about this...

best solution is to add an extra url parameter on each reload attempt

z



On Thu, Sep 11, 2008 at 4:46 PM, Kenneth Skovhede, GEOGRAF A/S <[hidden email]> wrote:
Since Fusion uses OpenLayers, there is an option to retry:
OpenLayers.IMAGE_RELOAD_ATTEMPTS = 3;

How you set that in Fusion, I don't know.
OpenLayers 2.5 seems to have a bug in how it tries to reload, but 2.6 should be good.
Regards, Kenneth Skovhede, GEOGRAF A/S


Jason Birch skrev:

I've seen #2 as well.  Not sure what causes it, and agree that it's annoying.  It would be better if it didn't happen in the first place, but if it's caused by a transitory server error or browser issue, it would be nice if there was a retry queue.

 

Jason

 

From: Marc Pfister
Subject: [fusion-users] PanQuery and pink backgrounds

 

 

1.       Has anyone run into a case where some image in the OpenLayers stack fails to load and instead returns a pink background and the broken image icon at top left? We can occasionally make it happen with some aggressive mousewheel work. The fun part is that the pink remains as a background for all successive pans and zooms. I know OpenLayers is making the pink tile and I can certainly just have it use white once the site is in production, but I'm not really sure why it persists after pan and zoom redraws.

 


_______________________________________________ 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




--
Zac Spitzer -
http://zacster.blogspot.com (My Blog)
+61 405 847 168

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

Re: PanQuery and pink backgrounds

Reply Threaded More More options
Print post
Permalink
In reply to this post by Marc Pfister
Hi Marc,

I haven't tried the panquery widget in a while.  The intention of the  
widget was to have a dual mode widget that if you click and drag, it  
pans and if you just click it does a query.  Looking at the code, it  
doesn't appear to have anything that would cause it to make two  
buttons.  Perhaps you have something unintentional in your  
ApplicationDefinition (widget declared twice perhaps?).

As mentioned in another reply, you can set  
OpenLayers.IMAGE_RELOAD_ATTEMPTS to some number greater than 1 - you  
need to do that after OpenLayers code has been loaded, the best place  
would probably be in the fusion initialized event handler

window.onload = function() {
   Fusion.registerForEvent(Fusion.Event.FUSION_INITIALIZED,  
fusionInitialized);
   Fusion.initialize();
}

function fusionInitialized() {
   OpenLayers.IMAGE_RELOAD_ATTEMPTS = 3;
}

Cheers

Paul

On 10-Sep-08, at 6:28 PM, Marc Pfister wrote:

> Two questions:
>
> 1.       Does the PanQuery widget work for anyone? When I add it to  
> applicationdefinition.xml, it shows up as two buttons in the  
> toolbar, both with the same “hand” icon. The first on is greyed out,  
> the second isn’t but can’t be selected.
>
> 2.       Has anyone run into a case where some image in the  
> OpenLayers stack fails to load and instead returns a pink background  
> and the broken image icon at top left? We can occasionally make it  
> happen with some aggressive mousewheel work. The fun part is that  
> the pink remains as a background for all successive pans and zooms.  
> I know OpenLayers is making the pink tile and I can certainly just  
> have it use white once the site is in production, but I’m not really  
> sure why it persists after pan and zoom redraws.
>
> n
> Marc Pfister
> Geospatial Data Manager
> ENPLAN
> [hidden email]
> 530/221-0440 x108
> 530/221-6963 Fax
>
> _______________________________________________
> fusion-users mailing list
> [hidden email]
> http://lists.osgeo.org/mailman/listinfo/fusion-users


__________________________________________

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

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

Re: PanQuery and pink backgrounds

Reply Threaded More More options
Print post
Permalink
I have been using the pan query widget for a couple of applications and have had no issues like the ones you are speaking of.

Cheers

Paul D.

On Thu, Sep 11, 2008 at 8:13 AM, Paul Spencer <[hidden email]> wrote:
Hi Marc,

I haven't tried the panquery widget in a while.  The intention of the widget was to have a dual mode widget that if you click and drag, it pans and if you just click it does a query.  Looking at the code, it doesn't appear to have anything that would cause it to make two buttons.  Perhaps you have something unintentional in your ApplicationDefinition (widget declared twice perhaps?).

As mentioned in another reply, you can set OpenLayers.IMAGE_RELOAD_ATTEMPTS to some number greater than 1 - you need to do that after OpenLayers code has been loaded, the best place would probably be in the fusion initialized event handler

window.onload = function() {
 Fusion.registerForEvent(Fusion.Event.FUSION_INITIALIZED, fusionInitialized);
 Fusion.initialize();
}

function fusionInitialized() {

 OpenLayers.IMAGE_RELOAD_ATTEMPTS = 3;
}

Cheers

Paul


On 10-Sep-08, at 6:28 PM, Marc Pfister wrote:

Two questions:

1.       Does the PanQuery widget work for anyone? When I add it to applicationdefinition.xml, it shows up as two buttons in the toolbar, both with the same "hand" icon. The first on is greyed out, the second isn't but can't be selected.

2.       Has anyone run into a case where some image in the OpenLayers stack fails to load and instead returns a pink background and the broken image icon at top left? We can occasionally make it happen with some aggressive mousewheel work. The fun part is that the pink remains as a background for all successive pans and zooms. I know OpenLayers is making the pink tile and I can certainly just have it use white once the site is in production, but I'm not really sure why it persists after pan and zoom redraws.

n
Marc Pfister
Geospatial Data Manager
ENPLAN
[hidden email]
530/221-0440 x108
530/221-6963 Fax

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


__________________________________________

  Paul Spencer
  Chief Technology Officer
  DM Solutions Group Inc
  http://www.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
Marc Pfister

RE: PanQuery and pink backgrounds

Reply Threaded More More options
Print post
Permalink
In reply to this post by Paul Spencer-2
Paul Spencer [mailto:[hidden email]] wrote:
> Perhaps you have something unintentional in your
> ApplicationDefinition (widget declared twice perhaps?).

That's what I thought too, but all I did was take my existing Pan button
Widget and changed it to type PanQuery

<Widget xsi:type="UiWidgetType">
<Name>Pan</Name>
<Type>PanQuery</Type>
<StatusItem>Drag the map to pan.</StatusItem>
<ImageUrl>images/icons/pan.png</ImageUrl>
<ImageClass/>
<Tooltip>Pan mode</Tooltip>
<Label/>
<Disabled/>
</Widget>

Marc


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

RE: PanQuery and pink backgrounds

Reply Threaded More More options
Print post
Permalink
Marc,

Are you also using the Pan widget. Causing my guess is you now have a
widget named 'Pan' that is of type 'Pan' and you also now have a widget
names 'Pan' of type 'PanQuery' don't create duplicate named widgets.
 
- 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 Marc Pfister
Sent: Thursday, September 11, 2008 2:39 PM
To: Paul Spencer
Cc: [hidden email]
Subject: RE: [fusion-users] PanQuery and pink backgrounds

Paul Spencer [mailto:[hidden email]] wrote:
> Perhaps you have something unintentional in your
> ApplicationDefinition (widget declared twice perhaps?).

That's what I thought too, but all I did was take my existing Pan button
Widget and changed it to type PanQuery

<Widget xsi:type="UiWidgetType">
<Name>Pan</Name>
<Type>PanQuery</Type>
<StatusItem>Drag the map to pan.</StatusItem>
<ImageUrl>images/icons/pan.png</ImageUrl>
<ImageClass/>
<Tooltip>Pan mode</Tooltip>
<Label/>
<Disabled/>
</Widget>

Marc


_______________________________________________
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
Marc Pfister

RE: PanQuery and pink backgrounds

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

Paul Spencer [mailto:[hidden email]] wrote:

> I haven't tried the panquery widget in a while.  The intention of the
> widget was to have a dual mode widget that if you click and drag, it
> pans and if you just click it does a query.  Looking at the code, it
> doesn't appear to have anything that would cause it to make two
> buttons.  Perhaps you have something unintentional in your
> ApplicationDefinition (widget declared twice perhaps?).

I noticed a few things and now have it working.

1. PanQuery.js requires Pan.js
2. I end up with 2 icons. Hmmmmm....
3. I set PanQuery.js and Pan.js to output a message to console when
initializing.
4. I have a map that only has PanQuery in its ApplicationDefinition.xml
5. When it starts, I get messages that both Pan and PanQuery have
initialized.
6. Perhaps it's adding a new OpenLayers control twice, once for each
initialization.
7. Try commenting out the creation and adding of the control in either
JS. No dice.
8. OK, try taking the event binding and the mouseup event method and
adding into pan.js
9. Use query-fied pan.js
10. Success!

So I'm not sure why exactly I couldn't get PanQuery.js to work, but it
seems to have something to do with the require.

Marc

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

Re: PanQuery and pink backgrounds

Reply Threaded More More options
Print post
Permalink
I would like to assist you on this:

1. Can we see your application? if not can you post your appdef. template and supporting js code?
2. What revision are you using?

Cheers

Paul D.

On Thu, Sep 11, 2008 at 5:18 PM, Marc Pfister <[hidden email]> wrote:

Paul Spencer [mailto:[hidden email]] wrote:

> I haven't tried the panquery widget in a while.  The intention of the
> widget was to have a dual mode widget that if you click and drag, it
> pans and if you just click it does a query.  Looking at the code, it
> doesn't appear to have anything that would cause it to make two
> buttons.  Perhaps you have something unintentional in your
> ApplicationDefinition (widget declared twice perhaps?).

I noticed a few things and now have it working.

1. PanQuery.js requires Pan.js
2. I end up with 2 icons. Hmmmmm....
3. I set PanQuery.js and Pan.js to output a message to console when
initializing.
4. I have a map that only has PanQuery in its ApplicationDefinition.xml
5. When it starts, I get messages that both Pan and PanQuery have
initialized.
6. Perhaps it's adding a new OpenLayers control twice, once for each
initialization.
7. Try commenting out the creation and adding of the control in either
JS. No dice.
8. OK, try taking the event binding and the mouseup event method and
adding into pan.js
9. Use query-fied pan.js
10. Success!

So I'm not sure why exactly I couldn't get PanQuery.js to work, but it
seems to have something to do with the require.

Marc

_______________________________________________
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
Marc Pfister

RE: PanQuery and pink backgrounds

Reply Threaded More More options
Print post
Permalink
Some javascript/style in this post has been disabled (why?)

My app is at:

 

http://209.20.81.81/fusion/templates/mapserver/corning/

 

Also, there’s some weird behavior I just noticed with PanQuery – when the map redraws, it draws a new querymap based off of a query on location where you started your click and drag, even though it does not make the selection there.

 

Note that my PanQuery is a modified pan.js, not panquery.js.

 

And, is it just me or is the selection highlight not drawn with the antialiased renderer?

 

I’m using 1.1.0 RC1.

 

Marc

 

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Paul Deschamps
Sent: Thursday, September 11, 2008 6:21 PM
To: Marc Pfister
Cc: Paul Spencer; [hidden email]
Subject: Re: [fusion-users] PanQuery and pink backgrounds

 

I would like to assist you on this:

1. Can we see your application? if not can you post your appdef. template and supporting js code?
2. What revision are you using?

Cheers

Paul D.

On Thu, Sep 11, 2008 at 5:18 PM, Marc Pfister <[hidden email]> wrote:


Paul Spencer [mailto:[hidden email]] wrote:

> I haven't tried the panquery widget in a while.  The intention of the
> widget was to have a dual mode widget that if you click and drag, it
> pans and if you just click it does a query.  Looking at the code, it
> doesn't appear to have anything that would cause it to make two
> buttons.  Perhaps you have something unintentional in your
> ApplicationDefinition (widget declared twice perhaps?).

I noticed a few things and now have it working.

1. PanQuery.js requires Pan.js
2. I end up with 2 icons. Hmmmmm....
3. I set PanQuery.js and Pan.js to output a message to console when
initializing.
4. I have a map that only has PanQuery in its ApplicationDefinition.xml
5. When it starts, I get messages that both Pan and PanQuery have
initialized.
6. Perhaps it's adding a new OpenLayers control twice, once for each
initialization.
7. Try commenting out the creation and adding of the control in either
JS. No dice.
8. OK, try taking the event binding and the mouseup event method and
adding into pan.js
9. Use query-fied pan.js
10. Success!

So I'm not sure why exactly I couldn't get PanQuery.js to work, but it
seems to have something to do with the require.

Marc


_______________________________________________
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 Deschamps

Re: PanQuery and pink backgrounds

Reply Threaded More More options
Print post
Permalink
I would be willing to assist you on getting the panquery widget to work.
Why are you using a hacked version of pan? when panquery is there?

heres an example for panquery in appDef

<!-- CONTAINER-->
      <Container>
          <Name>toolbar</Name>
          <Type>Toolbar</Type>
          <Position>left</Position>
          <Item>
              <Function>Widget</Function>
              <Widget>FitToWindow</Widget>
          </Item>
          <Item>
              <Function>Widget</Function>
              <Widget>ZoomIn</Widget>
          </Item>
          <Item>
              <Function>Widget</Function>
              <Widget>ZoomOut</Widget>
          </Item>
          <Item>
              <Function>Widget</Function>
              <Widget>PanQuery</Widget>
          </Item>
      </Container>

    <Widget>
        <Name>PanQuery</Name>
        <Type>PanQuery</Type>
        <Description>Click or click and drag to select features</Description>
      <Extension>
            <SelectionType>INTERSECTS</SelectionType>
            <Tolerance>25</Tolerance>
            <QueryActiveLayer>false</QueryActiveLayer>
      </Extension>
      <ImageUrl>images/icons/pan.png</ImageUrl>
      <Tooltip>Click or click and drag to select features</Tooltip>
    </Widget>

also if you do not want it to have a "button" for it at all you can add this to your fusion initialized function and set it active

function onInitialize() {
    
    var map = Fusion.getMapById('mapArea');

    // activate PanQuery
    var panWidget = Fusion.getWidgetById('PanQuery');
    map.activateWidget(panWidget);

}

If you want a clue on the "wierd behaviour" it is your map tips fired event that causes the focus to be lost.  That is causing the selection to be triggered when you pan.


Cheers

Paul D.

On Fri, Sep 12, 2008 at 1:07 PM, Marc Pfister <[hidden email]> wrote:

My app is at:

 

http://209.20.81.81/fusion/templates/mapserver/corning/

 

Also, there's some weird behavior I just noticed with PanQuery – when the map redraws, it draws a new querymap based off of a query on location where you started your click and drag, even though it does not make the selection there.

 

Note that my PanQuery is a modified pan.js, not panquery.js.

 

And, is it just me or is the selection highlight not drawn with the antialiased renderer?

 

I'm using 1.1.0 RC1.

 

Marc

 

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Paul Deschamps
Sent: Thursday, September 11, 2008 6:21 PM
To: Marc Pfister
Cc: Paul Spencer; [hidden email]
Subject: Re: [fusion-users] PanQuery and pink backgrounds

 

I would like to assist you on this:

1. Can we see your application? if not can you post your appdef. template and supporting js code?
2. What revision are you using?

Cheers

Paul D.

On Thu, Sep 11, 2008 at 5:18 PM, Marc Pfister <[hidden email]> wrote:


Paul Spencer [mailto:[hidden email]] wrote:

> I haven't tried the panquery widget in a while.  The intention of the
> widget was to have a dual mode widget that if you click and drag, it
> pans and if you just click it does a query.  Looking at the code, it
> doesn't appear to have anything that would cause it to make two
> buttons.  Perhaps you have something unintentional in your
> ApplicationDefinition (widget declared twice perhaps?).

I noticed a few things and now have it working.

1. PanQuery.js requires Pan.js
2. I end up with 2 icons. Hmmmmm....
3. I set PanQuery.js and Pan.js to output a message to console when
initializing.
4. I have a map that only has PanQuery in its ApplicationDefinition.xml
5. When it starts, I get messages that both Pan and PanQuery have
initialized.
6. Perhaps it's adding a new OpenLayers control twice, once for each
initialization.
7. Try commenting out the creation and adding of the control in either
JS. No dice.
8. OK, try taking the event binding and the mouseup event method and
adding into pan.js
9. Use query-fied pan.js
10. Success!

So I'm not sure why exactly I couldn't get PanQuery.js to work, but it
seems to have something to do with the require.

Marc


_______________________________________________
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 Deschamps

Re: PanQuery and pink backgrounds

Reply Threaded More More options
Print post
Permalink
My comments are within the original email below: adding this back into the list.

On Fri, Sep 12, 2008 at 2:26 PM, Marc Pfister <[hidden email]> wrote:

> Why are you using a hacked version of pan? when panquery is there?

 

 

I'm using the hacked version of pan because when I try to use panquery, I get two of the pan icons, one disabled and one enabled but not selectable. However if I just drop the onmouseup select method and event binding from panquery.js into pan.js, then it works as it is supposed to.


You should not have this issue if you were to revert it to the the panquery widget i can tell you why this is happening.

 

> If you want a clue on the "wierd behaviour" it is your map tips fired event that causes the focus to be lost.  That is causing the selection to be triggered when you pan

 

Well shoot. That's going to be a problem. I suppose I could make a clone of selection.php just for maptips that returns the same thing but doesn't trigger a selection event?

 

The other thing to note is the maptip is actually triggering a "QUERY / SELECTION" to get the maptip and thus the selection has changed. You can see the correct behavior if you quickly drag pan it does not get a chance to fire maptips and then change the selection.

What you need to do is basically disable the maptips widget when the pan widget is active.


Essentially in looking into this further it is the maptip div itself that is the losing focus issue. when you mouse moves over that div you loose focus on the map Window causing the pan to fire.


 

Thanks for your help,

 

Marc

 

Cheers

Paul D. 

 

 

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Paul Deschamps
Sent: Friday, September 12, 2008 11:16 AM


To: Marc Pfister
Cc: Paul Spencer; [hidden email]
Subject: Re: [fusion-users] PanQuery and pink backgrounds

 

I would be willing to assist you on getting the panquery widget to work.
Why are you using a hacked version of pan? when panquery is there?

heres an example for panquery in appDef

<!-- CONTAINER-->
      <Container>
          <Name>toolbar</Name>
          <Type>Toolbar</Type>
          <Position>left</Position>
          <Item>
              <Function>Widget</Function>
              <Widget>FitToWindow</Widget>
          </Item>
          <Item>
              <Function>Widget</Function>
              <Widget>ZoomIn</Widget>
          </Item>
          <Item>
              <Function>Widget</Function>
              <Widget>ZoomOut</Widget>
          </Item>
          <Item>
              <Function>Widget</Function>
              <Widget>PanQuery</Widget>
          </Item>
      </Container>

    <Widget>
        <Name>PanQuery</Name>
        <Type>PanQuery</Type>
        <Description>Click or click and drag to select features</Description>
      <Extension>
            <SelectionType>INTERSECTS</SelectionType>
            <Tolerance>25</Tolerance>
            <QueryActiveLayer>false</QueryActiveLayer>
      </Extension>
      <ImageUrl>images/icons/pan.png</ImageUrl>
      <Tooltip>Click or click and drag to select features</Tooltip>
    </Widget>

also if you do not want it to have a "button" for it at all you can add this to your fusion initialized function and set it active

function onInitialize() {
    
    var map = Fusion.getMapById('mapArea');

    // activate PanQuery
    var panWidget = Fusion.getWidgetById('PanQuery');
    map.activateWidget(panWidget);

}

If you want a clue on the "wierd behaviour" it is your map tips fired event that causes the focus to be lost.  That is causing the selection to be triggered when you pan.


Cheers

Paul D.

On Fri, Sep 12, 2008 at 1:07 PM, Marc Pfister <[hidden email]> wrote:

My app is at:

 

http://209.20.81.81/fusion/templates/mapserver/corning/

 

Also, there's some weird behavior I just noticed with PanQuery – when the map redraws, it draws a new querymap based off of a query on location where you started your click and drag, even though it does not make the selection there.

 

Note that my PanQuery is a modified pan.js, not panquery.js.

 

And, is it just me or is the selection highlight not drawn with the antialiased renderer?

 

I'm using 1.1.0 RC1.

 

Marc

 

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Paul Deschamps
Sent: Thursday, September 11, 2008 6:21 PM
To: Marc Pfister
Cc: Paul Spencer; [hidden email]
Subject: Re: [fusion-users] PanQuery and pink backgrounds

 

I would like to assist you on this:

1. Can we see your application? if not can you post your appdef. template and supporting js code?
2. What revision are you using?

Cheers

Paul D.

On Thu, Sep 11, 2008 at 5:18 PM, Marc Pfister <[hidden email]> wrote:


Paul Spencer [mailto:[hidden email]] wrote:

> I haven't tried the panquery widget in a while.  The intention of the
> widget was to have a dual mode widget that if you click and drag, it
> pans and if you just click it does a query.  Looking at the code, it
> doesn't appear to have anything that would cause it to make two
> buttons.  Perhaps you have something unintentional in your
> ApplicationDefinition (widget declared twice perhaps?).

I noticed a few things and now have it working.

1. PanQuery.js requires Pan.js
2. I end up with 2 icons. Hmmmmm....
3. I set PanQuery.js and Pan.js to output a message to console when
initializing.
4. I have a map that only has PanQuery in its ApplicationDefinition.xml
5. When it starts, I get messages that both Pan and PanQuery have
initialized.
6. Perhaps it's adding a new OpenLayers control twice, once for each
initialization.
7. Try commenting out the creation and adding of the control in either
JS. No dice.
8. OK, try taking the event binding and the mouseup event method and
adding into pan.js
9. Use query-fied pan.js
10. Success!

So I'm not sure why exactly I couldn't get PanQuery.js to work, but it
seems to have something to do with the require.

Marc


_______________________________________________
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
Marc Pfister

RE: PanQuery and pink backgrounds

Reply Threaded More More options
Print post
Permalink
Some javascript/style in this post has been disabled (why?)

> You should not have this issue if you were to revert it to the the panquery widget i can tell you why this is happening.

 

Here’s a version set to the PanQuery widget right now:

 

http://209.20.81.81/fusion/templates/mapserver/panquery

 

 

<Item xsi:type="WidgetItemType">

<Function>Widget</Function>

<Widget>PanTool</Widget>

</Item>

 

And

 

<Widget xsi:type="UiWidgetType">

<Name>PanTool</Name>

<Type>PanQuery</Type>

<StatusItem>Drag the map to pan.</StatusItem>

<ImageUrl>images/icons/pan.png</ImageUrl>

<ImageClass/>

<Tooltip>Pan mode</Tooltip>

<Label/>

<Disabled/>

</Widget>

 

 

>The other thing to note is the maptip is actually triggering a "QUERY / SELECTION" to get the maptip and thus the selection has changed. You can see the correct

>behavior if you quickly drag pan it does not get a chance to fire maptips and then change the selection.

 

>What you need to do is basically disable the maptips widget when the pan widget is active.

 

I need the maptips to be always be on, and it seems to break every UI convention of a tooltip to have it only work some of the time.

 

So in order to fix this, is it possible to query information without changing the selection? Alternately, could one store the current selection, and have maptips revert back to that selection after it does its query/selection thing?

 

Marc

 

 

 

 

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Paul Deschamps
Sent: Friday, September 12, 2008 1:00 PM
To: Marc Pfister; fusion-users
Subject: Re: [fusion-users] PanQuery and pink backgrounds

 

My comments are within the original email below: adding this back into the list.

On Fri, Sep 12, 2008 at 2:26 PM, Marc Pfister <[hidden email]> wrote:

> Why are you using a hacked version of pan? when panquery is there?

 

 

I'm using the hacked version of pan because when I try to use panquery, I get two of the pan icons, one disabled and one enabled but not selectable. However if I just drop the onmouseup select method and event binding from panquery.js into pan.js, then it works as it is supposed to.


You should not have this issue if you were to revert it to the the panquery widget i can tell you why this is happening.

 

> If you want a clue on the "wierd behaviour" it is your map tips fired event that causes the focus to be lost.  That is causing the selection to be triggered when you pan

 

Well shoot. That's going to be a problem. I suppose I could make a clone of selection.php just for maptips that returns the same thing but doesn't trigger a selection event?

 

The other thing to note is the maptip is actually triggering a "QUERY / SELECTION" to get the maptip and thus the selection has changed. You can see the correct behavior if you quickly drag pan it does not get a chance to fire maptips and then change the selection.

What you need to do is basically disable the maptips widget when the pan widget is active.

Essentially in looking into this further it is the maptip div itself that is the losing focus issue. when you mouse moves over that div you loose focus on the map Window causing the pan to fire.



 

Thanks for your help,

 

Marc

 

Cheers

Paul D. 

 

 

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Paul Deschamps
Sent: Friday, September 12, 2008 11:16 AM


To: Marc Pfister
Cc: Paul Spencer; [hidden email]
Subject: Re: [fusion-users] PanQuery and pink backgrounds

 

I would be willing to assist you on getting the panquery widget to work.
Why are you using a hacked version of pan? when panquery is there?

heres an example for panquery in appDef

<!-- CONTAINER-->
      <Container>
          <Name>toolbar</Name>
          <Type>Toolbar</Type>
          <Position>left</Position>
          <Item>
              <Function>Widget</Function>
              <Widget>FitToWindow</Widget>
          </Item>
          <Item>
              <Function>Widget</Function>
              <Widget>ZoomIn</Widget>
          </Item>
          <Item>
              <Function>Widget</Function>
              <Widget>ZoomOut</Widget>
          </Item>
          <Item>
              <Function>Widget</Function>
              <Widget>PanQuery</Widget>
          </Item>
      </Container>

    <Widget>
        <Name>PanQuery</Name>
        <Type>PanQuery</Type>
        <Description>Click or click and drag to select features</Description>
      <Extension>
            <SelectionType>INTERSECTS</SelectionType>
            <Tolerance>25</Tolerance>
            <QueryActiveLayer>false</QueryActiveLayer>
      </Extension>
      <ImageUrl>images/icons/pan.png</ImageUrl>
      <Tooltip>Click or click and drag to select features</Tooltip>
    </Widget>

also if you do not want it to have a "button" for it at all you can add this to your fusion initialized function and set it active

function onInitialize() {
    
    var map = Fusion.getMapById('mapArea');

    // activate PanQuery
    var panWidget = Fusion.getWidgetById('PanQuery');
    map.activateWidget(panWidget);

}

If you want a clue on the "wierd behaviour" it is your map tips fired event that causes the focus to be lost.  That is causing the selection to be triggered when you pan.


Cheers

Paul D.

On Fri, Sep 12, 2008 at 1:07 PM, Marc Pfister <[hidden email]> wrote:

My app is at:

 

http://209.20.81.81/fusion/templates/mapserver/corning/

 

Also, there's some weird behavior I just noticed with PanQuery – when the map redraws, it draws a new querymap based off of a query on location where you started your click and drag, even though it does not make the selection there.

 

Note that my PanQuery is a modified pan.js, not panquery.js.

 

And, is it just me or is the selection highlight not drawn with the antialiased renderer?

 

I'm using 1.1.0 RC1.

 

Marc

 

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Paul Deschamps
Sent: Thursday, September 11, 2008 6:21 PM
To: Marc Pfister
Cc: Paul Spencer; [hidden email]
Subject: Re: [fusion-users] PanQuery and pink backgrounds

 

I would like to assist you on this:

1. Can we see your application? if not can you post your appdef. template and supporting js code?
2. What revision are you using?

Cheers

Paul D.

On Thu, Sep 11, 2008 at 5:18 PM, Marc Pfister <[hidden email]> wrote:


Paul Spencer [mailto:[hidden email]] wrote:

> I haven't tried the panquery widget in a while.  The intention of the
> widget was to have a dual mode widget that if you click and drag, it
> pans and if you just click it does a query.  Looking at the code, it
> doesn't appear to have anything that would cause it to make two
> buttons.  Perhaps you have something unintentional in your
> ApplicationDefinition (widget declared twice perhaps?).

I noticed a few things and now have it working.

1. PanQuery.js requires Pan.js
2. I end up with 2 icons. Hmmmmm....
3. I set PanQuery.js and Pan.js to output a message to console when
initializing.
4. I have a map that only has PanQuery in its ApplicationDefinition.xml
5. When it starts, I get messages that both Pan and PanQuery have
initialized.
6. Perhaps it's adding a new OpenLayers control twice, once for each
initialization.
7. Try commenting out the creation and adding of the control in either
JS. No dice.
8. OK, try taking the event binding and the mouseup event method and
adding into pan.js
9. Use query-fied pan.js
10. Success!

So I'm not sure why exactly I couldn't get PanQuery.js to work, but it
seems to have something to do with the require.

Marc


_______________________________________________
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 Deschamps

Re: PanQuery and pink backgrounds

Reply Threaded More More options
Print post
Permalink
Hi Marc,

First in your fusion init function replace your activate widget code to this:

   var panWidget = Fusion.getWidgetById('PanTool');
   mapWidget.activateWidget(panWidget);

Second use the pan widget definition i have provided in my earlier email (show below) as well.

  <Widget>
        <Name>PanTool</Name>
        <Type>PanQuery</Type>
        <Description>Click or click and drag to select features</Description>
      <Extension>
            <SelectionType>INTERSECTS</SelectionType>
            <Tolerance>25</Tolerance>
            <QueryActiveLayer>false</QueryActiveLayer>
      </Extension>
      <ImageUrl>images/icons/pan.png</ImageUrl>
      <Tooltip>Click or click and drag to select features</Tooltip>
    </Widget>



On Fri, Sep 12, 2008 at 4:36 PM, Marc Pfister <[hidden email]> wrote:

>The other thing to note is the maptip is actually triggering a "QUERY / SELECTION" to get the maptip and thus the selection has changed. You can see the correct

>behavior if you quickly drag pan it does not get a chance to fire maptips and then change the selection.

 

>What you need to do is basically disable the maptips widget when the pan widget is active.

 

I need the maptips to be always be on, and it seems to break every UI convention of a tooltip to have it only work some of the time.


One thing you can try is to just offset it a little from the cursor position. it's not a fix but if we are able to get the selection issue resolved  it would be less obvious.
 

So in order to fix this, is it possible to query information without changing the selection? Alternately, could one store the current selection, and have maptips revert back to that selection after it does its query/selection thing?


Your widget is a good basis thus far. Here's one method you can do to preform the query:

call a separate php script in the widget and in that script open up the mapfile then do a queryByRect and return the results in json.

You can also add extension parameters in your appdef so you know what layer(s) you want to display. The parsed applicationDef widget extentsion data is located in the widgetTag.extension object.

Then your json would only return the data that the tips is looking for and your not preforming a query/selection in the fusion framework.

Add this to the init section of the widget:

        var json = widgetTag.extension;

        this.szMaptipLayerName = json.LayerName ? json.LayerName[0] : this.LayerName;
        this.szAttribureName = json.AttributeName ? json.AttributeName[0] : this.AttributeName;

Now in your maptips widget extensions you have.

      <Extension>
           <LayerName>some_layer_name</LayerName>
           <AttributeName>Parcel_name</AttributeName>
      </Extension>

Hope this helps

Cheers

Paul D.

---
Paul Deschamps
Applications Specialist
DM Solutions Group.




From: [hidden email] [mailto:[hidden email]] On Behalf Of Paul Deschamps
Sent: Friday, September 12, 2008 1:00 PM
To: Marc Pfister; fusion-users


Subject: Re: [fusion-users] PanQuery and pink backgrounds

 

My comments are within the original email below: adding this back into the list.

On Fri, Sep 12, 2008 at 2:26 PM, Marc Pfister <[hidden email]> wrote:

> Why are you using a hacked version of pan? when panquery is there?

 

 

I'm using the hacked version of pan because when I try to use panquery, I get two of the pan icons, one disabled and one enabled but not selectable. However if I just drop the onmouseup select method and event binding from panquery.js into pan.js, then it works as it is supposed to.


You should not have this issue if you were to revert it to the the panquery widget i can tell you why this is happening.

 

> If you want a clue on the "wierd behaviour" it is your map tips fired event that causes the focus to be lost.  That is causing the selection to be triggered when you pan

 

Well shoot. That's going to be a problem. I suppose I could make a clone of selection.php just for maptips that returns the same thing but doesn't trigger a selection event?

 

The other thing to note is the maptip is actually triggering a "QUERY / SELECTION" to get the maptip and thus the selection has changed. You can see the correct behavior if you quickly drag pan it does not get a chance to fire maptips and then change the selection.

What you need to do is basically disable the maptips widget when the pan widget is active.

Essentially in looking into this further it is the maptip div itself that is the losing focus issue. when you mouse moves over that div you loose focus on the map Window causing the pan to fire.



 

Thanks for your help,

 

Marc

 

Cheers

Paul D. 

 

 

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Paul Deschamps
Sent: Friday, September 12, 2008 11:16 AM


To: Marc Pfister
Cc: Paul Spencer; [hidden email]
Subject: Re: [fusion-users] PanQuery and pink backgrounds

 

I would be willing to assist you on getting the panquery widget to work.
Why are you using a hacked version of pan? when panquery is there?

heres an example for panquery in appDef

<!-- CONTAINER-->
      <Container>
          <Name>toolbar</Name>
          <Type>Toolbar</Type>
          <Position>left</Position>
          <Item>
              <Function>Widget</Function>
              <Widget>FitToWindow</Widget>
          </Item>
          <Item>
              <Function>Widget</Function>
              <Widget>ZoomIn</Widget>
          </Item>
          <Item>
              <Function>Widget</Function>
              <Widget>ZoomOut</Widget>
          </Item>
          <Item>
              <Function>Widget</Function>
              <Widget>PanQuery</Widget>
          </Item>
      </Container>

    <Widget>
        <Name>PanQuery</Name>
        <Type>PanQuery</Type>
        <Description>Click or click and drag to select features</Description>
      <Extension>
            <SelectionType>INTERSECTS</SelectionType>
            <Tolerance>25</Tolerance>
            <QueryActiveLayer>false</QueryActiveLayer>
      </Extension>
      <ImageUrl>images/icons/pan.png</ImageUrl>
      <Tooltip>Click or click and drag to select features</Tooltip>
    </Widget>

also if you do not want it to have a "button" for it at all you can add this to your fusion initialized function and set it active

function onInitialize() {
    
    var map = Fusion.getMapById('mapArea');

    // activate PanQuery
    var panWidget = Fusion.getWidgetById('PanQuery');
    map.activateWidget(panWidget);

}

If you want a clue on the "wierd behaviour" it is your map tips fired event that causes the focus to be lost.  That is causing the selection to be triggered when you pan.


Cheers

Paul D.

On Fri, Sep 12, 2008 at 1:07 PM, Marc Pfister <[hidden email]> wrote:

My app is at:

 

http://209.20.81.81/fusion/templates/mapserver/corning/

 

Also, there's some weird behavior I just noticed with PanQuery – when the map redraws, it draws a new querymap based off of a query on location where you started your click and drag, even though it does not make the selection there.

 

Note that my PanQuery is a modified pan.js, not panquery.js.

 

And, is it just me or is the selection highlight not drawn with the antialiased renderer?

 

I'm using 1.1.0 RC1.

 

Marc

 

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Paul Deschamps
Sent: Thursday, September 11, 2008 6:21 PM
To: Marc Pfister
Cc: Paul Spencer; [hidden email]
Subject: Re: [fusion-users] PanQuery and pink backgrounds

 

I would like to assist you on this:

1. Can we see your application? if not can you post your appdef. template and supporting js code?
2. What revision are you using?

Cheers

Paul D.

On Thu, Sep 11, 2008 at 5:18 PM, Marc Pfister <[hidden email]> wrote:


Paul Spencer [mailto:[hidden email]] wrote:

> I haven't tried the panquery widget in a while.  The intention of the
> widget was to have a dual mode widget that if you click and drag, it
> pans and if you just click it does a query.  Looking at the code, it
> doesn't appear to have anything that would cause it to make two
> buttons.  Perhaps you have something unintentional in your
> ApplicationDefinition (widget declared twice perhaps?).

I noticed a few things and now have it working.

1. PanQuery.js requires Pan.js
2. I end up with 2 icons. Hmmmmm....
3. I set PanQuery.js and Pan.js to output a message to console when
initializing.
4. I have a map that only has PanQuery in its ApplicationDefinition.xml
5. When it starts, I get messages that both Pan and PanQuery have
initialized.
6. Perhaps it's adding a new OpenLayers control twice, once for each
initialization.
7. Try commenting out the creation and adding of the control in either
JS. No dice.
8. OK, try taking the event binding and the mouseup event method and
adding into pan.js
9. Use query-fied pan.js
10. Success!

So I'm not sure why exactly I couldn't get PanQuery.js to work, but it
seems to have something to do with the require.

Marc


_______________________________________________
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
Marc Pfister

RE: PanQuery and pink backgrounds

Reply Threaded More More options
Print post
Permalink
Some javascript/style in this post has been disabled (why?)

Paul,

 

I made the two changes and PanQuery still shows the same behavior with two useless hand icons in the toolbar.

 

http://209.20.81.81/fusion/templates/mapserver/panquery/

 

http://209.20.81.81/fusion/templates/mapserver/panquery/ApplicationDefinition.xml

 

I do get the following error in Firebug:

 

oWidget is null:

 

  if (oWidget.isMutEx()) {

 

Map.js (line 812)

 

 

Marc

 

 

 

 

 

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Paul Deschamps
Sent: Friday, September 12, 2008 8:13 PM
To: Marc Pfister
Cc: fusion-users
Subject: Re: [fusion-users] PanQuery and pink backgrounds

 

Hi Marc,

First in your fusion init function replace your activate widget code to this:

   var panWidget = Fusion.getWidgetById('PanTool');
   mapWidget.activateWidget(panWidget);

Second use the pan widget definition i have provided in my earlier email (show below) as well.

  <Widget>
        <Name>PanTool</Name>
        <Type>PanQuery</Type>
        <Description>Click or click and drag to select features</Description>
      <Extension>
            <SelectionType>INTERSECTS</SelectionType>

            <Tolerance>25</Tolerance>
            <QueryActiveLayer>false</QueryActiveLayer>
      </Extension>

      <ImageUrl>images/icons/pan.png</ImageUrl>

      <Tooltip>Click or click and drag to select features</Tooltip>
    </Widget>



 


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

RE: PanQuery and pink backgrounds

Reply Threaded More More options
Print post
Permalink
In reply to this post by Paul Deschamps
Paul Deschamps [mailto:[hidden email]] wrote:

>Your widget is a good basis thus far. Here's one method you can do to
preform the query:
>call a separate php script in the widget and in that script open up the
mapfile then do
>a queryByRect and return the results in json.

OK, great - I'll whip that up and see what happens.

>You can also add extension parameters in your appdef so you know what
layer(s) you want to display.
>The parsed applicationDef widget extentsion data is located in the
widgetTag.extension object.

I already have that coded up but it needs some testing.

Thanks again for your help,

Marc


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

Re: PanQuery and pink backgrounds

Reply Threaded More More options
Print post
Permalink
In reply to this post by Marc Pfister
Hi Marc,

This issue is not entirely obvious. Though in my efforts I have setup a simple application that uses a toolbar with the panquery and tested it with RC1.1 and it works perfectly.

I suspect their is something invalid or improper in your html template. What I would do is remove certain sections and see if you can get the widget to function.

I have seen strange things happen with these applications where either their was a missing quote, an extra quote or missing or extra end tag.

I suspect that is the case here.

Start with an application definition with just the one of the toolbars and a map. No Context menu no nested containers etc. and start adding stuff until this error occurs. then you'll know which section the issue exist.

Happy Hunting.

Cheers

Paul D.


On Mon, Sep 15, 2008 at 1:43 PM, Marc Pfister <[hidden email]> wrote:

Paul,

 

I made the two changes and PanQuery still shows the same behavior with two useless hand icons in the toolbar.

 

http://209.20.81.81/fusion/templates/mapserver/panquery/

 

http://209.20.81.81/fusion/templates/mapserver/panquery/ApplicationDefinition.xml

 

I do get the following error in Firebug:

 

oWidget is null:

 

  if (oWidget.isMutEx()) {

 

Map.js (line 812)

 

 

Marc

 

 

 

 

 

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Paul Deschamps
Sent: Friday, September 12, 2008 8:13 PM
To: Marc Pfister
Cc: fusion-users


Subject: Re: [fusion-users] PanQuery and pink backgrounds

 

Hi Marc,



First in your fusion init function replace your activate widget code to this:

   var panWidget = Fusion.getWidgetById('PanTool');
   mapWidget.activateWidget(panWidget);

Second use the pan widget definition i have provided in my earlier email (show below) as well.

  <Widget>
        <Name>PanTool</Name>
        <Type>PanQuery</Type>
        <Description>Click or click and drag to select features</Description>
      <Extension>
            <SelectionType>INTERSECTS</SelectionType>

            <Tolerance>25</Tolerance>
            <QueryActiveLayer>false</QueryActiveLayer>
      </Extension>

      <ImageUrl>images/icons/pan.png</ImageUrl>

      <Tooltip>Click or click and drag to select features</Tooltip>
    </Widget>



 




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

panQuery.zip (9K) Download Attachment
Marc Pfister

Maptips on Mapserver (was: PanQuery and pink backgrounds)

Reply Threaded More More options
Print post
Permalink
In reply to this post by Paul Deschamps
Paul Deschamps wrote
 
>One thing you can try is to just offset it a little from the cursor position. it's not
>a fix but if we are able to get the selection issue resolved  it would be less obvious.

>Your widget is a good basis thus far. Here's one method you can do to preform the query:
>
>call a separate php script in the widget and in that script open up the mapfile then do
>a queryByRect and return the results in json.

Here's Maptips fixed to use a separate PHP script for MapServer. It now seems to work pretty nicely. The code should work for both MapGuide and Mapserver, though I don't have a MapGuide install any more to test against.

I've also added extension parameters for MapServer to specify which fields in the feature class to use for the text and hyperlink in the MapTip.

And to help it work with PanQuery, I added a 5 pixel offset to the Maptip div so that it isn't under the mouse and taking away focus. I considered making it an extension parameter too but maybe that's not needed.

http://209.20.81.81/fusion/templates/mapserver/corning/
http://209.20.81.81/fusion/widgets/Maptip2.js



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

Re: Maptips on Mapserver (was: PanQuery and pink backgrounds)

Reply Threaded More More options
Print post
Permalink
Nice work, Marc!  Here's what I'd like to do with this widget:

1) write a php script for MapGuide equivalent to the MapServer one you  
have written - both will take the same parameters
2) return the same JSON object from both scripts
3) make the client side completely generic to both architectures

I've created a ticket for this: http://trac.osgeo.org/fusion/ticket/127

If you are willing, can you attach your PHP script, Maptip2.js and  
anything else we might need to incorporate this into trunk?

Cheers

Paul

On 16-Sep-08, at 2:16 PM, Marc Pfister wrote:

> Paul Deschamps wrote
>
>> One thing you can try is to just offset it a little from the cursor  
>> position. it's not
>> a fix but if we are able to get the selection issue resolved  it  
>> would be less obvious.
>>
>> Your widget is a good basis thus far. Here's one method you can do  
>> to preform the query:
>>
>> call a separate php script in the widget and in that script open up  
>> the mapfile then do
>> a queryByRect and return the results in json.
>
> Here's Maptips fixed to use a separate PHP script for MapServer. It  
> now seems to work pretty nicely. The code should work for both  
> MapGuide and Mapserver, though I don't have a MapGuide install any  
> more to test against.
>
> I've also added extension parameters for MapServer to specify which  
> fields in the feature class to use for the text and hyperlink in the  
> MapTip.
>
> And to help it work with PanQuery, I added a 5 pixel offset to the  
> Maptip div so that it isn't under the mouse and taking away focus. I  
> considered making it an extension parameter too but maybe that's not  
> needed.
>
> http://209.20.81.81/fusion/templates/mapserver/corning/
> http://209.20.81.81/fusion/widgets/Maptip2.js
>
>
>
> Marc
> _______________________________________________
> fusion-users mailing list
> [hidden email]
> http://lists.osgeo.org/mailman/listinfo/fusion-users


__________________________________________

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

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