[Geomoose-users] Mouseover map area to show pop up or link- Point Data

Nayna Nayate nayna.nayate at gis.leg.mn
Thu Jun 24 15:30:28 EDT 2010


I had an issue that maybe somewhat related. The problem was the hover worked on my PC but not on anyone else's PC. The problem was the identify.php in the Hover code.
 My computer accepted the url as http://gis....../php/identify.php. Everyone else's computer required a http://www.gis...../php/identify.php. The website url also needed to be http://www for the pop-up to show. Instead of just http://. I think it was something to do with a DNS.

Not sure if that'll helps but that was the issue I had.

If the hover works on polygons, maybe you can buffer the point layer as a workaround.  Hope that helps.
From: FRANZ OKYERE [mailto:franzzoa at hotmail.com]
Sent: 24 June 2010 09:42
To: Geomooselist
Subject: Re: [Geomoose-users] Mouseover map area to show pop up or link- Point Data

Yes Len, the error is gone from the error console when I was consistent with the root. But the popup still does not show up when I hover over the point locations. I will assume there is no problem with using identify tool on points and keep looking for any mistakes and omissions (if there is could someone tell me what the workaround is). Cheers.

Franz
________________________________
From: lkne at houstoneng.com
To: franzzoa at hotmail.com; geomoose-users at lists.sourceforge.net
Subject: RE: [Geomoose-users] Mouseover map area to show pop up or link- Point Data
Date: Thu, 24 Jun 2010 13:49:10 +0000
Seems like it could be a proxy issue.  I notice that the URL refers to "franzy-pc", which is probably your localhost.  Even though frenzy-pc and localhost are the same computer, they are seen as two different sources.  Can you try changing your URL or matching everything up in the map-source and hover script?

Len

From: FRANZ OKYERE [mailto:franzzoa at hotmail.com]
Sent: Wednesday, June 23, 2010 1:51 PM
To: Geomooselist
Subject: Re: [Geomoose-users] Mouseover map area to show pop up or link- Point Data


I have set tolerance to a larger pixel value (10) just to make sure. I get the following error in mozilla's error console anytime I hover over the point locations.


Error: uncaught exception: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIXMLHttpRequest.send]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: http://franzy-pc/geomoose2/OpenLayers-2.8/OpenLayers.js :: anonymous :: line 1081"  data: no]


> From: lkne at houstoneng.com<mailto:lkne at houstoneng.com>
> To: franzzoa at hotmail.com<mailto:franzzoa at hotmail.com>; geomoose-users at lists.sourceforge.net<mailto:geomoose-users at lists.sourceforge.net>
> Subject: RE: [Geomoose-users] Mouseover map area to show pop up or link
> Date: Wed, 23 Jun 2010 13:43:05 +0000
>
> Hi Franz
>
> Do you have TOLERANCE set in your map file for the point layer? Also, the newer version of MapServer requires the template to have the first line be:
>
> <!-- MapServer Template -->
>
> Let us know if this helps.
>
> Len
>
> -----Original Message-----
> From: franzzoa at hotmail.com<mailto:franzzoa at hotmail.com> [mailto:franzzoa at hotmail.com]<mailto:[mailto:franzzoa at hotmail.com]>
> Sent: Wednesday, June 23, 2010 3:19 AM
> To: Geomooselist
> Subject: Re: [Geomoose-users] Mouseover map area to show pop up or link
>
> Hi all,
>
> I have succeeded in implementing your code on a polygon data set but with point data I think there is probably an issue. There seem to be a fundamental problem that I am not aware of. I have checked and rechecked the templates, the mapfile and as for the code its the same. There is something probably funny with the querybypoint as opposed to querybyshape? Any idea Len (its kinda your brain child?)?
>
> Franz
>
>
> --------------------------------------------------
> From: "Len Kne" <lkne at houstoneng.com<mailto:lkne at houstoneng.com>>
> Sent: Thursday, June 03, 2010 4:40 PM
> To: "'Brent Fraser'" <bfraser at geoanalytic.com<mailto:bfraser at geoanalytic.com>>
> Cc: "Geomooselist" <geomoose-users at lists.sourceforge.net<mailto:geomoose-users at lists.sourceforge.net>>
> Subject: Re: [Geomoose-users] Mouseover map area to show pop up or link
>
> > Performance seems ok, you can try it at
> > http://dev.houstoneng.net/geomoose.html. 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.
> >
> > Len
> >
> > -----Original Message-----
> > From: Brent Fraser [mailto:bfraser at geoanalytic.com]<mailto:[mailto:bfraser at geoanalytic.com]>
> > Sent: Thursday, June 03, 2010 10:05 AM
> > To: Len Kne
> > Cc: Geomooselist
> > Subject: Re: [Geomoose-users] Mouseover map area to show pop up or
> > link
> >
> > Len,
> >
> > That's impressive! How's the performance?
> >
> > Brent
> >
> > Len Kne wrote:
> >> One way would be to use OL Hover handler - see
> >> http://openlayers.org/dev/examples/hover-handler.html. Basically it
> >> is going to make an ajax call to the identify service when the cursor
> >> hovers over a spot for a set time. The script below works in my
> >> testing environment... it could be enabled as a tool or in
> >> onLoadedMapbook().
> >>
> >>
> >>
> >> Len
> >>
> >>
> >>
> >> // Hover support on WMS and MapServr layers
> >>
> >> var popup;
> >>
> >> OpenLayers.Control.Hover =
> >> OpenLayers.Class(OpenLayers.Control, {
> >>
> >> defaultHandlerOptions: {
> >>
> >> 'delay': 500,
> >>
> >> 'pixelTolerance': 20,
> >>
> >> 'stopMove': false
> >>
> >> },
> >>
> >>
> >>
> >> initialize: function(options) {
> >>
> >> this.handlerOptions = OpenLayers.Util.extend(
> >>
> >> {}, this.defaultHandlerOptions
> >>
> >> );
> >>
> >> OpenLayers.Control.prototype.initialize.apply(
> >>
> >> this, arguments
> >>
> >> );
> >>
> >> this.handler = new OpenLayers.Handler.Hover(
> >>
> >> this,
> >>
> >> {'pause': this.onPause, 'move': this.onMove},
> >>
> >> this.handlerOptions
> >>
> >> );
> >>
> >> },
> >>
> >>
> >>
> >> onPause: function(evt) {
> >>
> >> var feature =
> >> Map.getLonLatFromPixel(evt.xy);
> >>
> >> var url =
> >> '/php/identify.php?';
> >>
> >> var layersArray =
> >> GeoMOOSE.getVisibleLayers();
> >>
> >> layers =
> >> layersArray.join(':');
> >>
> >> var requestOptions =
> >> OpenLayers.Request.GET({
> >>
> >> url:
> >> url,
> >>
> >> params:
> >> {'shape': 'POINT(' + feature.lon + ' ' + feature.lat + ')',
> >>
> >>
> >> 'layers': layers,
> >>
> >>
> >> '_moosetime': (new Date()).getTime() },
> >>
> >> async:
> >> false
> >>
> >> });
> >>
> >>
> >>
> >>
> >> if(requestOptions.responseText) {
> >>
> >> popup
> >> = new OpenLayers.Popup.FramedCloud("wms",
> >>
> >>
> >> Map.getLonLatFromPixel(evt.xy),
> >>
> >>
> >> null,
> >>
> >>
> >> requestOptions.responseText,
> >>
> >>
> >> null, false);
> >>
> >>
> >> Map.addPopup(popup);
> >>
> >> }
> >>
> >> },
> >>
> >>
> >>
> >> onMove: function(evt) {
> >>
> >> if (popup != null) {
> >>
> >> popup.destroy();
> >>
> >> popup = null;
> >>
> >> }
> >>
> >>
> >>
> >> // if this control sent an Ajax request (e.g.
> >> GetFeatureInfo) when
> >>
> >> // the mouse pauses the onMove callback could be
> >> used to abort that
> >>
> >> // request.
> >>
> >> }
> >>
> >> });
> >>
> >>
> >>
> >> hover = new OpenLayers.Control.Hover();
> >>
> >> Map.addControl(hover);
> >>
> >> hover.activate();
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >> *From:* FRANZ OKYERE [mailto:franzzoa at hotmail.com]<mailto:[mailto:franzzoa at hotmail.com]>
> >> *Sent:* Wednesday, June 02, 2010 4:28 PM
> >> *To:* Geomooselist
> >> *Subject:* Re: [Geomoose-users] Mouseover map area to show pop up or
> >> link
> >>
> >>
> >>
> >> Thanks,
> >>
> >>
> >>
> >> But is geomoose not based on open layers? If it is then what we can
> >> do in open layers should be possible in geomoose, right? I really
> >> need to do this so if you can point me in the right direction and
> >> show me which of the javascript files I should be editing that would be nice.
> >>
> >>
> >>
> >> Franz
> >>
> >> ---------------------------------------------------------------------
> >> -
> >> --
> >>
> >> Date: Wed, 2 Jun 2010 14:29:24 -0500
> >> From: Bob.Basques at ci.stpaul.mn.us<mailto:Bob.Basques at ci.stpaul.mn.us>
> >> <mailto:Bob.Basques at ci.stpaul.mn.us>
> >> To: bfraser at geoanalytic.com<mailto:bfraser at geoanalytic.com> <mailto:bfraser at geoanalytic.com>;
> >> franzzoa at hotmail.com<mailto:franzzoa at hotmail.com> <mailto:franzzoa at hotmail.com>
> >> CC: geomoose-users at lists.sourceforge.net<mailto:geomoose-users at lists.sourceforge.net>
> >> <mailto:geomoose-users at lists.sourceforge.net>
> >> Subject: Re: [Geomoose-users] Mouseover map area to show pop up or
> >> link
> >>
> >> All,
> >>
> >>
> >>
> >> Not on the feature(s), but the layer name/metadata icon in the side menu.
> >>
> >>
> >>
> >> bobb
> >>
> >>
> >>
> >>
> >>
> >>> >> Brent Fraser <bfraser at geoanalytic.com
<mailto:bfraser at geoanalytic.com%0b>> >> <mailto:bfraser at geoanalytic.com>> wrote:
> >>
> >> You mean by simply moving the cursor over the feature but not
> >> clicking it?
> >> Geomoose no (as far as I know). OpenLayers has a hover handler so we
> >> might be able to use that...
> >>
> >> Brent Fraser
> >>
> >> FRANZ OKYERE wrote:
> >>> Hello all,
> >>>
> >>> I am using geomoose 2.2 and wish to do what google maps or bing
> >>> maps are able to do- i.e. mouseover a location on the map and then
> >>> get the popup showing up. Any ideas? Is such a thing possible at
> >>> all in geomoose?
> >>>
> >>> Cheers.
> >>>
> >>> Franz
> >>>
> >>> GIS Specialist, Ghana.
> >>>
> >>>
> >>> --------------------------------------------------------------------
> >>> -
> >>> --- Get a free e-mail account with Hotmail. Sign-up now.
> >>>
> >>>
> >>>
> >>> --------------------------------------------------------------------
> >>> -
> >>> ---
> >>>
> >>>
> >> ---------------------------------------------------------------------
> >> -
> >> --------
> >>>
> >>>
> >>>
> >>>
> >>> --------------------------------------------------------------------
> >>> -
> >>> ---
> >>>
> >>> _______________________________________________
> >>> Geomoose-users mailing list
> >>> Geomoose-users at lists.sourceforge.net<mailto:Geomoose-users at lists.sourceforge.net>
> >> <mailto:Geomoose-users at lists.sourceforge.net>
> >>> https://lists.sourceforge.net/lists/listinfo/geomoose-users
> >>
> >>
> >> ---------------------------------------------------------------------
> >> -
> >> -------- ThinkGeek and WIRED's GeekDad team up for the Ultimate
> >> GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the lucky
> >> parental unit. See the prize list and enter to win:
> >> http://p.sf.net/sfu/thinkgeek-promo
> >> _______________________________________________
> >> Geomoose-users mailing list
> >> Geomoose-users at lists.sourceforge.net<mailto:Geomoose-users at lists.sourceforge.net>
> >> <mailto:Geomoose-users at lists.sourceforge.net>
> >> https://lists.sourceforge.net/lists/listinfo/geomoose-users
> >>
> >>
> >>
> >> ---------------------------------------------------------------------
> >> -
> >> --
> >>
> >> Get a new e-mail account with Hotmail - Free. Sign-up now.
> >> <http://clk.atdmt.com/UKM/go/197222280/direct/01/>
> >>
> >>
> >> ---------------------------------------------------------------------
> >> -
> >> --
> >>
> >> ---------------------------------------------------------------------
> >> -
> >> -------- ThinkGeek and WIRED's GeekDad team up for the Ultimate
> >> GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the lucky
> >> parental unit. See the prize list and enter to win:
> >> http://p.sf.net/sfu/thinkgeek-promo
> >>
> >>
> >> ---------------------------------------------------------------------
> >> -
> >> --
> >>
> >> _______________________________________________
> >> Geomoose-users mailing list
> >> Geomoose-users at lists.sourceforge.net<mailto:Geomoose-users at lists.sourceforge.net>
> >> https://lists.sourceforge.net/lists/listinfo/geomoose-users
> >
> >
> > ----------------------------------------------------------------------
> > -------- ThinkGeek and WIRED's GeekDad team up for the Ultimate
> > GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the lucky parental
> > unit. See the prize list and enter to win:
> > http://p.sf.net/sfu/thinkgeek-promo
> > _______________________________________________
> > Geomoose-users mailing list
> > Geomoose-users at lists.sourceforge.net<mailto:Geomoose-users at lists.sourceforge.net>
> > https://lists.sourceforge.net/lists/listinfo/geomoose-users
> >
>
> ------------------------------------------------------------------------------
> ThinkGeek and WIRED's GeekDad team up for the Ultimate GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the lucky parental unit. See the prize list and enter to win:
> http://p.sf.net/sfu/thinkgeek-promo
> _______________________________________________
> Geomoose-users mailing list
> Geomoose-users at lists.sourceforge.net<mailto:Geomoose-users at lists.sourceforge.net>
> https://lists.sourceforge.net/lists/listinfo/geomoose-users

________________________________
Get a new e-mail account with Hotmail - Free. Sign-up now.<http://clk.atdmt.com/UKM/go/197222280/direct/01/>

________________________________
Get a free e-mail account with Hotmail. Sign-up now.<http://clk.atdmt.com/UKM/go/197222280/direct/01/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/geomoose-users/attachments/20100624/13782557/attachment.html


More information about the Geomoose-users mailing list