<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Verdana;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";}
span.EmailStyle20
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Hi Franz<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>The code I posted still needs some work to be integrated with GM, specifically it bypasses calling the service processing portion of GM. So when using the Identify service (or any other service) in GM, GM is expecting the results to come back as XML. The hover script is not expecting XML, just plain text or HTML. As the hover script is, you will need to have a custom identify.php to send the results back. Near the end of identify.php, modify the following lines:<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>header('Content-type: application/text');<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>//print "<results>";<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>//print "<script/>";<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>//print "<html><![CDATA[";<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>print processTemplate($contents, $substArray);<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>//print "]]></html>";<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>//print "</results>";<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Len<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><div><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> FRANZ OKYERE [mailto:franzzoa@hotmail.com] <br><b>Sent:</b> Thursday, June 10, 2010 3:03 AM<br><b>To:</b> Geomooselist<br><b>Subject:</b> Re: [Geomoose-users] Mouseover map area to show pop up or link<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>Hi Len,<o:p></o:p></span></p><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>I stuck your code the following function definition but even thought the popup shows up it does not contain any information.<o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'><o:p> </o:p></span></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>this.onLoadedMapbook = function(mapbookXML) {<o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>#your hover code<o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'><o:p> </o:p></span></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>}<o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'><o:p> </o:p></span></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'> I changed the line setting the url to the identify.php like this to suite my local settings.<o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'> <o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>var url = 'http://localhost/moosecache2/php/identify.php?';<o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'><o:p> </o:p></span></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>I am not sure if there is something else I need to do to. I have seen it work on your site so it should work on my I suppose.<o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'><o:p> </o:p></span></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>Franz<o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'><o:p> </o:p></span></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'><o:p> </o:p></span></p></div><div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>> From: lkne@houstoneng.com<br>> To: bfraser@geoanalytic.com<br>> Date: Thu, 3 Jun 2010 15:40:50 +0000<br>> CC: geomoose-users@lists.sourceforge.net<br>> Subject: Re: [Geomoose-users] Mouseover map area to show pop up or link<br>> <br>> Performance seems ok, you can try it at <a href="http://dev.houstoneng.net/geomoose.html">http://dev.houstoneng.net/geomoose.html</a>. Hover over a parcel for 1 second and you should get a popup. It's different than passing over a marker in OL because the handler is triggered after a pause in mouse movement vs. going over the marker. The downside is there will be a lot of calls back to the server (could be an issue on a high use app) and in the case of parcels, the number of popups could get annoying to the person looking at the map. Might work better with point data.<br>> <br>> Len<br>> <br>> -----Original Message-----<br>> From: Brent Fraser <a href="mailto:[mailto:bfraser@geoanalytic.com]">[mailto:bfraser@geoanalytic.com]</a> <br>> Sent: Thursday, June 03, 2010 10:05 AM<br>> To: Len Kne<br>> Cc: Geomooselist<br>> Subject: Re: [Geomoose-users] Mouseover map area to show pop up or link<br>> <br>> Len,<br>> <br>> That's impressive! How's the performance?<br>> <br>> Brent<br>> <br>> Len Kne wrote:<br>> > One way would be to use OL Hover handler - see <br>> > <a href="http://openlayers.org/dev/examples/hover-handler.html">http://openlayers.org/dev/examples/hover-handler.html</a>. Basically it <br>> > is going to make an ajax call to the identify service when the cursor <br>> > hovers over a spot for a set time. The script below works in my <br>> > testing environment... it could be enabled as a tool or in onLoadedMapbook().<br>> > <br>> > <br>> > <br>> > Len<br>> > <br>> > <br>> > <br>> > // Hover support on WMS and MapServr layers<br>> > <br>> > var popup;<br>> > <br>> > OpenLayers.Control.Hover = <br>> > OpenLayers.Class(OpenLayers.Control, { <br>> > <br>> > defaultHandlerOptions: {<br>> > <br>> > 'delay': 500,<br>> > <br>> > 'pixelTolerance': 20,<br>> > <br>> > 'stopMove': false<br>> > <br>> > },<br>> > <br>> > <br>> > <br>> > initialize: function(options) {<br>> > <br>> > this.handlerOptions = OpenLayers.Util.extend(<br>> > <br>> > {}, this.defaultHandlerOptions<br>> > <br>> > );<br>> > <br>> > OpenLayers.Control.prototype.initialize.apply(<br>> > <br>> > this, arguments<br>> > <br>> > );<br>> > <br>> > this.handler = new OpenLayers.Handler.Hover(<br>> > <br>> > this,<br>> > <br>> > {'pause': this.onPause, 'move': this.onMove},<br>> > <br>> > this.handlerOptions<br>> > <br>> > );<br>> > <br>> > },<br>> > <br>> > <br>> > <br>> > onPause: function(evt) {<br>> > <br>> > var feature = <br>> > Map.getLonLatFromPixel(evt.xy);<br>> > <br>> > var url = <br>> > '/php/identify.php?';<br>> > <br>> > var layersArray = <br>> > GeoMOOSE.getVisibleLayers();<br>> > <br>> > layers = <br>> > layersArray.join(':');<br>> > <br>> > var requestOptions = <br>> > OpenLayers.Request.GET({<br>> > <br>> > url: <br>> > url,<br>> > <br>> > params: <br>> > {'shape': 'POINT(' + feature.lon + ' ' + feature.lat + ')',<br>> > <br>> > <br>> > 'layers': layers,<br>> > <br>> > <br>> > '_moosetime': (new Date()).getTime() },<br>> > <br>> > async: <br>> > false<br>> > <br>> > });<br>> > <br>> > <br>> > <br>> > <br>> > if(requestOptions.responseText) {<br>> > <br>> > popup <br>> > = new OpenLayers.Popup.FramedCloud("wms",<br>> > <br>> > <br>> > Map.getLonLatFromPixel(evt.xy),<br>> > <br>> > <br>> > null,<br>> > <br>> > <br>> > requestOptions.responseText,<br>> > <br>> > <br>> > null, false);<br>> > <br>> > <br>> > Map.addPopup(popup);<br>> > <br>> > } <br>> > <br>> > },<br>> > <br>> > <br>> > <br>> > onMove: function(evt) {<br>> > <br>> > if (popup != null) {<br>> > <br>> > popup.destroy();<br>> > <br>> > popup = null;<br>> > <br>> > }<br>> > <br>> > <br>> > <br>> > // if this control sent an Ajax request (e.g. <br>> > GetFeatureInfo) when<br>> > <br>> > // the mouse pauses the onMove callback could be <br>> > used to abort that<br>> > <br>> > // request.<br>> > <br>> > }<br>> > <br>> > });<br>> > <br>> > <br>> > <br>> > hover = new OpenLayers.Control.Hover(); <br>> > <br>> > Map.addControl(hover);<br>> > <br>> > hover.activate();<br>> > <br>> > <br>> > <br>> > <br>> > <br>> > <br>> > <br>> > *From:* FRANZ OKYERE <a href="mailto:[mailto:franzzoa@hotmail.com]">[mailto:franzzoa@hotmail.com]</a><br>> > *Sent:* Wednesday, June 02, 2010 4:28 PM<br>> > *To:* Geomooselist<br>> > *Subject:* Re: [Geomoose-users] Mouseover map area to show pop up or <br>> > link<br>> > <br>> > <br>> > <br>> > Thanks,<br>> > <br>> > <br>> > <br>> > But is geomoose not based on open layers? If it is then what we can do <br>> > in open layers should be possible in geomoose, right? I really need to <br>> > do this so if you can point me in the right direction and show me <br>> > which of the javascript files I should be editing that would be nice.<br>> > <br>> > <br>> > <br>> > Franz<br>> > <br>> > ----------------------------------------------------------------------<br>> > --<br>> > <br>> > Date: Wed, 2 Jun 2010 14:29:24 -0500<br>> > From: <a href="mailto:Bob.Basques@ci.stpaul.mn.us">Bob.Basques@ci.stpaul.mn.us</a> <<a href="mailto:Bob.Basques@ci.stpaul.mn.us">mailto:Bob.Basques@ci.stpaul.mn.us</a>><br>> > To: <a href="mailto:bfraser@geoanalytic.com">bfraser@geoanalytic.com</a> <<a href="mailto:bfraser@geoanalytic.com">mailto:bfraser@geoanalytic.com</a>>; <br>> > <a href="mailto:franzzoa@hotmail.com">franzzoa@hotmail.com</a> <<a href="mailto:franzzoa@hotmail.com">mailto:franzzoa@hotmail.com</a>><br>> > CC: <a href="mailto:geomoose-users@lists.sourceforge.net">geomoose-users@lists.sourceforge.net</a><br>> > <<a href="mailto:geomoose-users@lists.sourceforge.net">mailto:geomoose-users@lists.sourceforge.net</a>><br>> > Subject: Re: [Geomoose-users] Mouseover map area to show pop up or <br>> > link<br>> > <br>> > All,<br>> > <br>> > <br>> > <br>> > Not on the feature(s), but the layer name/metadata icon in the side menu.<br>> > <br>> > <br>> > <br>> > bobb<br>> > <br>> > <br>> > <br>> > <br>> > <br>> >> >> Brent Fraser <<a href="mailto:bfraser@geoanalytic.com%0b">bfraser@geoanalytic.com<br></a>> > <<a href="mailto:bfraser@geoanalytic.com">mailto:bfraser@geoanalytic.com</a>>> wrote:<br>> > <br>> > You mean by simply moving the cursor over the feature but not clicking it?<br>> > Geomoose no (as far as I know). OpenLayers has a hover handler so we <br>> > might be able to use that...<br>> > <br>> > Brent Fraser<br>> > <br>> > FRANZ OKYERE wrote:<br>> >> Hello all,<br>> >><br>> >> I am using geomoose 2.2 and wish to do what google maps or bing maps <br>> >> are able to do- i.e. mouseover a location on the map and then get <br>> >> the popup showing up. Any ideas? Is such a thing possible at all in geomoose?<br>> >><br>> >> Cheers.<br>> >><br>> >> Franz<br>> >><br>> >> GIS Specialist, Ghana.<br>> >><br>> >> <br>> >> ---------------------------------------------------------------------<br>> >> --- Get a free e-mail account with Hotmail. Sign-up now.<br>> >><br>> >><br>> >> <br>> >> ---------------------------------------------------------------------<br>> >> ---<br>> >><br>> >> <br>> > ----------------------------------------------------------------------<br>> > --------<br>> >><br>> >><br>> >><br>> >> <br>> >> ---------------------------------------------------------------------<br>> >> ---<br>> >><br>> >> _______________________________________________<br>> >> Geomoose-users mailing list<br>> >> <a href="mailto:Geomoose-users@lists.sourceforge.net">Geomoose-users@lists.sourceforge.net</a><br>> > <<a href="mailto:Geomoose-users@lists.sourceforge.net">mailto:Geomoose-users@lists.sourceforge.net</a>><br>> >> <a href="https://lists.sourceforge.net/lists/listinfo/geomoose-users">https://lists.sourceforge.net/lists/listinfo/geomoose-users</a><br>> > <br>> > <br>> > ----------------------------------------------------------------------<br>> > -------- ThinkGeek and WIRED's GeekDad team up for the Ultimate <br>> > GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the lucky parental <br>> > unit. See the prize list and enter to win:<br>> > <a href="http://p.sf.net/sfu/thinkgeek-promo">http://p.sf.net/sfu/thinkgeek-promo</a><br>> > _______________________________________________<br>> > Geomoose-users mailing list<br>> > <a href="mailto:Geomoose-users@lists.sourceforge.net">Geomoose-users@lists.sourceforge.net</a><br>> > <<a href="mailto:Geomoose-users@lists.sourceforge.net">mailto:Geomoose-users@lists.sourceforge.net</a>><br>> > <a href="https://lists.sourceforge.net/lists/listinfo/geomoose-users">https://lists.sourceforge.net/lists/listinfo/geomoose-users</a><br>> > <br>> > <br>> > <br>> > ----------------------------------------------------------------------<br>> > --<br>> > <br>> > Get a new e-mail account with Hotmail - Free. Sign-up now. <br>> > <<a href="http://clk.atdmt.com/UKM/go/197222280/direct/01/">http://clk.atdmt.com/UKM/go/197222280/direct/01/</a>><br>> > <br>> > <br>> > ----------------------------------------------------------------------<br>> > --<br>> > <br>> > ----------------------------------------------------------------------<br>> > -------- ThinkGeek and WIRED's GeekDad team up for the Ultimate <br>> > GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the lucky parental <br>> > unit. See the prize list and enter to win:<br>> > <a href="http://p.sf.net/sfu/thinkgeek-promo">http://p.sf.net/sfu/thinkgeek-promo</a><br>> > <br>> > <br>> > ----------------------------------------------------------------------<br>> > --<br>> > <br>> > _______________________________________________<br>> > Geomoose-users mailing list<br>> > <a href="mailto:Geomoose-users@lists.sourceforge.net">Geomoose-users@lists.sourceforge.net</a><br>> > <a href="https://lists.sourceforge.net/lists/listinfo/geomoose-users">https://lists.sourceforge.net/lists/listinfo/geomoose-users</a><br>> <br>> <br>> ------------------------------------------------------------------------------<br>> ThinkGeek and WIRED's GeekDad team up for the Ultimate <br>> GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the <br>> lucky parental unit. See the prize list and enter to win: <br>> <a href="http://p.sf.net/sfu/thinkgeek-promo">http://p.sf.net/sfu/thinkgeek-promo</a><br>> _______________________________________________<br>> Geomoose-users mailing list<br>> <a href="mailto:Geomoose-users@lists.sourceforge.net">Geomoose-users@lists.sourceforge.net</a><br>> <a href="https://lists.sourceforge.net/lists/listinfo/geomoose-users">https://lists.sourceforge.net/lists/listinfo/geomoose-users</a><o:p></o:p></span></p></div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'><o:p> </o:p></span></p><div class=MsoNormal align=center style='text-align:center'><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'><hr size=2 width="100%" align=center></span></div><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>Get a new e-mail account with Hotmail - Free. <a href="http://clk.atdmt.com/UKM/go/197222280/direct/01/" target="_new">Sign-up now.</a><o:p></o:p></span></p></div></body></html>