Maptips on Mapserver

classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

Maptips on Mapserver

Marc Pfister

Has anyone implemented maptip-like functionality for Mapserver instead of MapGuide? It seems like you could switch Fusion to using the generic selection tool instead of the MG specific one.

 

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
Reply | Threaded
Open this post in threaded view
|

Re: Maptips on Mapserver

Paul Deschamps
To my knowledge no.. but you are correct it would be quite simple to develop one using the select widget
All that is needed is to have some logic to detect mouse movement and when the mouse is still have it fire a query.
and output the results.

Cheers

Paul D.


On Tue, Aug 26, 2008 at 2:36 PM, Marc Pfister <[hidden email]> wrote:

Has anyone implemented maptip-like functionality for Mapserver instead of MapGuide? It seems like you could switch Fusion to using the generic selection tool instead of the MG specific one.

 

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



_______________________________________________
fusion-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/fusion-users
Reply | Threaded
Open this post in threaded view
|

RE: Maptips on Mapserver

Marc Pfister

It’s easy to just take the current maptip code which handles the mouse movement detection and modify it to fire off a Map.Query instead of the MG one. However, when you do this every time you stop moving the mouse you trigger a redraw to show the selection highlighted.

 

So where exactly is the query code? I think I’ll just tweak that that to pass the query back to the maptip code.

 

Also, speaking of queries – is there  a way to change the selection highlight color and lineweight?

 

Marc

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Paul Deschamps
Sent: Tuesday, August 26, 2008 11:46 AM
To: Marc Pfister
Cc: [hidden email]
Subject: Re: [fusion-users] Maptips on Mapserver

 

To my knowledge no.. but you are correct it would be quite simple to develop one using the select widget
All that is needed is to have some logic to detect mouse movement and when the mouse is still have it fire a query.
and output the results.

Cheers

Paul D.

On Tue, Aug 26, 2008 at 2:36 PM, Marc Pfister <[hidden email]> wrote:

Has anyone implemented maptip-like functionality for Mapserver instead of MapGuide? It seems like you could switch Fusion to using the generic selection tool instead of the MG specific one.

 

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

 


_______________________________________________
fusion-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/fusion-users
Reply | Threaded
Open this post in threaded view
|

Re: Maptips on Mapserver

Paul Deschamps
The mapserver highlight is part of the query block

http://mapserver.gis.umn.edu/docs/reference/mapfile/querymap

Have a look at the SelectionPannel widget it has a complete Query/Select->DisplayResults Process for mapserver.

Cheers

Paul.


On Tue, Aug 26, 2008 at 8:04 PM, Marc Pfister <[hidden email]> wrote:

It's easy to just take the current maptip code which handles the mouse movement detection and modify it to fire off a Map.Query instead of the MG one. However, when you do this every time you stop moving the mouse you trigger a redraw to show the selection highlighted.

 

So where exactly is the query code? I think I'll just tweak that that to pass the query back to the maptip code.

 

Also, speaking of queries – is there  a way to change the selection highlight color and lineweight?

 

Marc

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Paul Deschamps
Sent: Tuesday, August 26, 2008 11:46 AM
To: Marc Pfister
Cc: [hidden email]
Subject: Re: [fusion-users] Maptips on Mapserver

 

To my knowledge no.. but you are correct it would be quite simple to develop one using the select widget
All that is needed is to have some logic to detect mouse movement and when the mouse is still have it fire a query.
and output the results.

Cheers

Paul D.

On Tue, Aug 26, 2008 at 2:36 PM, Marc Pfister <[hidden email]> wrote:

Has anyone implemented maptip-like functionality for Mapserver instead of MapGuide? It seems like you could switch Fusion to using the generic selection tool instead of the MG specific one.

 

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

 



_______________________________________________
fusion-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/fusion-users
Reply | Threaded
Open this post in threaded view
|

RE: Maptips on Mapserver

Marc Pfister
In reply to this post by Marc Pfister

 

I have bodged maptips to work with Mapserver and have the code kicking back the string I want to display in the tooltip. However, the code seems like it expects some XML generated by MapGuide. Can someone who runs MapGuide post an example of the XML so I can reproduce it and pass it on to the _display function and keep it all happy?

 

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Paul Deschamps
Sent: Wednesday, August 27, 2008 6:11 AM
To: Marc Pfister
Subject: Re: [fusion-users] Maptips on Mapserver

 

The mapserver highlight is part of the query block

http://mapserver.gis.umn.edu/docs/reference/mapfile/querymap

Have a look at the SelectionPannel widget it has a complete Query/Select->DisplayResults Process for mapserver.

Cheers

Paul.

On Tue, Aug 26, 2008 at 8:04 PM, Marc Pfister <[hidden email]> wrote:

It's easy to just take the current maptip code which handles the mouse movement detection and modify it to fire off a Map.Query instead of the MG one. However, when you do this every time you stop moving the mouse you trigger a redraw to show the selection highlighted.

 

So where exactly is the query code? I think I'll just tweak that that to pass the query back to the maptip code.

 

Also, speaking of queries – is there  a way to change the selection highlight color and lineweight?

 

Marc

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Paul Deschamps
Sent: Tuesday, August 26, 2008 11:46 AM
To: Marc Pfister
Cc: [hidden email]
Subject: Re: [fusion-users] Maptips on Mapserver

 

To my knowledge no.. but you are correct it would be quite simple to develop one using the select widget
All that is needed is to have some logic to detect mouse movement and when the mouse is still have it fire a query.
and output the results.

Cheers

Paul D.

On Tue, Aug 26, 2008 at 2:36 PM, Marc Pfister <[hidden email]> wrote:

Has anyone implemented maptip-like functionality for Mapserver instead of MapGuide? It seems like you could switch Fusion to using the generic selection tool instead of the MG specific one.

 

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

 

 


_______________________________________________
fusion-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/fusion-users
Reply | Threaded
Open this post in threaded view
|

RE: Maptips on Mapserver

Jason Birch
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

RE: Maptips on Mapserver

Marc Pfister
I have Maptips sort-of working now on Mapserver. Only problem is that
they aren't visible. On FF3 I thought it might be a Z-index thing, like
the measure tool, but I don't see them on IE7 either. Looking at the
HTML source in Firebug though, it certainly looks like it created the
Maptip.

Does this look right? Here's the html:


<li id="FusionItem28" class="maptipContainer" style="display: block;
top: 480px; left: 612px; visibility: visible;">
<div class="maptipContent">
SPMU-CH-CBDZ
<iframe class="maptipShim" scrolling="no" style="width: 1271px; height:
42px;">
<html>
<head>
<title/>
</head>
<body/>
</html>
</iframe>
</div>
</li>

It's in this map if you'd like to take a closer look:

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

The console log will return the value of the maptip and a message that
it set the maptip to "visible'.

Marc



_______________________________________________
fusion-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/fusion-users
Reply | Threaded
Open this post in threaded view
|

Re: Maptips on Mapserver

Paul Spencer-2
Marc,

couple of things -

1.  Why is the maptip container an LI element?  That seems odd.  It  
looks actually like you've assigned your MapTip widget to something in  
a toolbar?  You should not put it in a toolbar, but rather add an  
extra div to your page.

<div id="maptipContainer"></div>

2. You need to add the z-index on this container object:

#maptipContainer {
   position: absolute;
   z-index: 101
}

3. Starting with ffox 3 you need to assign z-indexes to other things  
that are parallel to the maptip container, in this case the div with  
the id 'thePage':

#thePage {
   zindex: 1
}

should do the trick.  I think IE is similar in this respect.

Cheers

Paul

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

> I have Maptips sort-of working now on Mapserver. Only problem is that
> they aren't visible. On FF3 I thought it might be a Z-index thing,  
> like
> the measure tool, but I don't see them on IE7 either. Looking at the
> HTML source in Firebug though, it certainly looks like it created the
> Maptip.
>
> Does this look right? Here's the html:
>
>
> <li id="FusionItem28" class="maptipContainer" style="display: block;
> top: 480px; left: 612px; visibility: visible;">
> <div class="maptipContent">
> SPMU-CH-CBDZ
> <iframe class="maptipShim" scrolling="no" style="width: 1271px;  
> height:
> 42px;">
> <html>
> <head>
> <title/>
> </head>
> <body/>
> </html>
> </iframe>
> </div>
> </li>
>
> It's in this map if you'd like to take a closer look:
>
> http://209.20.81.81/fusion/templates/mapserver/corning/
>
> The console log will return the value of the maptip and a message that
> it set the maptip to "visible'.
>
> 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
Reply | Threaded
Open this post in threaded view
|

RE: Maptips on Mapserver

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

> 1.  Why is the maptip container an LI element?  That seems odd.  It
> looks actually like you've assigned your MapTip widget to something in
> a toolbar?  You should not put it in a toolbar, but rather add an
> extra div to your page.
>
> <div id="maptipContainer"></div>

Hmm, for some reason I added the Widget to the end of one of the toolbar
containers in ApplicationDefinition.XML, so no wonder it was doing that.

 
So that then leads to the question, what exactly is the right way to use
maptip in ApplicationDefinition.XML?

I've got the widget added:

<Widget xsi:type="WidgetType">
<Name>Maptip</Name>
<Type>Maptip</Type>
<StatusItem/>
</Widget>

But now though Maptip.js loads, it never initializes. It was
initializing when I had the Maptip as an item in the toolbar container,
so do I need some sort of container for the maptip that corresponds to
the maptipContainer div?

Marc
_______________________________________________
fusion-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/fusion-users
Reply | Threaded
Open this post in threaded view
|

Re: Maptips on Mapserver

Michael Adair
That should be all you need, as long as the <Name> element for MapTip
widget in AppDef MapTip matches the ID of the div in your template.

Mike

Marc Pfister wrote:

> Paul Spencer [mailto:[hidden email]] wrote:
>
>  
>> 1.  Why is the maptip container an LI element?  That seems odd.  It
>> looks actually like you've assigned your MapTip widget to something in
>> a toolbar?  You should not put it in a toolbar, but rather add an
>> extra div to your page.
>>
>> <div id="maptipContainer"></div>
>>    
>
> Hmm, for some reason I added the Widget to the end of one of the toolbar
> containers in ApplicationDefinition.XML, so no wonder it was doing that.
>
>  
> So that then leads to the question, what exactly is the right way to use
> maptip in ApplicationDefinition.XML?
>
> I've got the widget added:
>
> <Widget xsi:type="WidgetType">
> <Name>Maptip</Name>
> <Type>Maptip</Type>
> <StatusItem/>
> </Widget>
>
> But now though Maptip.js loads, it never initializes. It was
> initializing when I had the Maptip as an item in the toolbar container,
> so do I need some sort of container for the maptip that corresponds to
> the maptipContainer div?
>
> 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
Reply | Threaded
Open this post in threaded view
|

RE: Maptips on Mapserver

Nolte, Tim
In reply to this post by Marc Pfister
Marc,

Here is the spec on the Maptip widget:
        http://trac.osgeo.org/fusion/wiki/Widgets/Maptip

Also, for an example of the Maptip Widget in the
ApplicationDefinition.XML look at the one included in
'fusion\templates\mapguide\standard'.

BTW, I'm very interested in your solution on this. :-)

- 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 04, 2008 2:12 PM
To: Paul Spencer
Cc: [hidden email]
Subject: RE: [fusion-users] Maptips on Mapserver

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

> 1.  Why is the maptip container an LI element?  That seems odd.  It
> looks actually like you've assigned your MapTip widget to something in
> a toolbar?  You should not put it in a toolbar, but rather add an
> extra div to your page.
>
> <div id="maptipContainer"></div>

Hmm, for some reason I added the Widget to the end of one of the toolbar
containers in ApplicationDefinition.XML, so no wonder it was doing that.

 
So that then leads to the question, what exactly is the right way to use
maptip in ApplicationDefinition.XML?

I've got the widget added:

<Widget xsi:type="WidgetType">
<Name>Maptip</Name>
<Type>Maptip</Type>
<StatusItem/>
</Widget>

But now though Maptip.js loads, it never initializes. It was
initializing when I had the Maptip as an item in the toolbar container,
so do I need some sort of container for the maptip that corresponds to
the maptipContainer div?

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
Reply | Threaded
Open this post in threaded view
|

RE: Maptips on Mapserver

Marc Pfister
In reply to this post by Michael Adair
Mike Adair [mailto:[hidden email]] wrote:

> That should be all you need, as long as the <Name> element for MapTip
> widget in AppDef MapTip matches the ID of the div in your template.

Which it doesn't. Or should I say didn't. Slowly this is all making
sense.

I present to you maptips on Mapserver:

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

The code is currently ugly and useless for the general public, but now
that at least this works I will fix that. I'll set it up to pass some
Mapserver-specific parameter for the fields to use for the maptip text
and hyperlink instead of hardcoded values.

Can someone point to what I need to know about checking code out and
back in. I've always been a passive user of SVN and the like but now it
seems I'm going to need to learn more.

Also, should this be on Fusion-Dev or Fusion-Users?

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