[Geomoose-users] FW: Displaying google layers and Geomoose popups- GM2.2

FRANZ OKYERE franzzoa at hotmail.com
Tue Sep 6 13:53:30 EDT 2011


Thats right Dan. Essentially, google layers would be in the background too. Thanks for the help.

Date: Tue, 6 Sep 2011 10:40:26 -0700
From: danlittle at yahoo.com
Subject: Re: [Geomoose-users] FW: Displaying google layers and Geomoose popups- GM2.2
To: franzzoa at hotmail.com; geomoose-users at lists.sourceforge.net

I totally understand installation frustration.  I really do want to be helpful, or at least try, and just needed some clarification.
So, do you essentially want the Identify to be on all of the time? Then when you click the map, at any time, it shows a popup with content?
From: FRANZ OKYERE <franzzoa at hotmail.com>
To: Geomooselist
 <geomoose-users at lists.sourceforge.net>
Sent: Tuesday, September 6, 2011 12:35 PM
Subject: Re: [Geomoose-users] FW: Displaying google layers and Geomoose popups- GM2.2






Hi Len,

1. I have adapted Len's codes in order to show a popup on click on the map area.
2. I need to show google layer as  background and still be able to do this (1)
Problem: Onclick even does not work when google layer is turned on.
Sorry for making things probably convoluted than it need be. I got frustrated and a bit livid trying to work around the problem. Please any suggestion is welcomed.
Thanks.
Franz

Date: Tue, 6 Sep 2011 09:44:16 -0700
From: danlittle at yahoo.com
Subject: Re: [Geomoose-users] FW: Displaying google layers and Geomoose popups- GM2.2
To: franzzoa at hotmail.com

What are you trying to do? I understand there's something funny going on between some onclick event and Google Maps.  But I have no idea what you are trying to click on (map? radio button?) or what you're trying to do with it.
Frankly, I have no idea, and you're running what looks to be some hacked up code written a while back by Len.
From: FRANZ OKYERE <franzzoa at hotmail.com>
To: Geomooselist <geomoose-users at lists.sourceforge.net>
Sent: Tuesday, September 6, 2011 11:28 AM
Subject: [Geomoose-users] FW: Displaying google layers and Geomoose popups- GM2.2








From: franzzoa at hotmail.com
To: geomoose-users at lists.sourceforge.net
Date: Sun, 4 Sep 2011 21:31:25 +0000
Subject: [Geomoose-users] Displaying google layers and Geomoose popups- GM2.2



 
 



Hi all,
Can someone help me comment the right lines- in either geoomoose.html or mapbook.xmlis out as I am  not able to get the onclick event to work and still have my google layers as the background.       
 <script type="text/javascript"
 src="http://maps.google.com.gh/maps?file=api&v=2&key=ABQIAAAAnfs7bKE82qgb3Zc2YyS-oBT2yXp_ZAY8_ufC3CFXhHIE1NvwkxSySz_REpPq-4WZA27OwgbtyR3VcA"></script>	
<script type="text/javascript" src="OpenLayers-2.8/OpenLayers.js"></script>
	<script type="text/javascript" src="compiled.js"></script>

	<script type="text/javascript" src="python/all_js.py"></script>
	<script type="text/javascript" src="php/all_js.php"></script>

When I turn off the google layers in mapbook (<layer title="Streets"
 src="google_streets/all" status="off"/>) I can get the javascript onclick event (in compiled.js as shown below) working for my popup to show up. I cannot have google layer at the background and still have the onclick event to trigger my popup which is actually an identify in disguise.

/*#######Courtesy Len Kne Hover to show popup myHoverHandler#######*/
// Hover support on WMS and MapServr layers
var popup;

OpenLayers.Control.Click = OpenLayers.Class(OpenLayers.Control,
 { 
defaultHandlerOptions: {
'delay':
 500,
'single': true,'double': false,'pixelTolerance': 0,'stopSingle': false,'stopDouble': false
},


initialize: function(options) {
this.handlerOptions = OpenLayers.Util.extend(
{}, this.defaultHandlerOptions
);
OpenLayers.Control.prototype.initialize.apply(
this, arguments
);
this.handler = new OpenLayers.Handler.Click(
this,
this, {                            'click': this.onClick,                            'dblclick':
 this.onDblclick                         }, this.handlerOptions
);
},


onClick: function(evt) {
var feature = Map.getLonLatFromPixel(evt.xy);
var url = 'http://localhost/geomoose2i/php/identify2.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
});
//Clear Popup is any beforeclearPopups();

if(requestOptions.responseText) {
popup = new OpenLayers.Popup.FramedCloud("wms",

Map.getLonLatFromPixel(evt.xy),

null,

requestOptions.responseText,

null, true);//Fonzi//if(popup != null) {Map.addPopup(popup); 
// }} 
}
});


click = new
 OpenLayers.Control.Click(); 
Map.addControl(click);
click.activate();

/*###### End of hoverhandler stuff.


Franz 
GIS Specialist. 		 	   		  

------------------------------------------------------------------------------
Special Offer -- Download ArcSight Logger for FREE!
Finally, a world-class log management solution at an even better 
price-free! And you'll get a free "Love Thy Logs" t-shirt when you
download Logger. Secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsisghtdev2dev
_______________________________________________
Geomoose-users mailing list
Geomoose-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geomoose-users 		 	   		   

------------------------------------------------------------------------------
Special Offer -- Download ArcSight Logger for FREE!
Finally, a world-class log management solution at an even better 
price-free! And you'll get a free "Love Thy Logs" t-shirt when you
download Logger. Secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsisghtdev2dev
_______________________________________________
Geomoose-users mailing list
Geomoose-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geomoose-users


 		 	   		 
  

------------------------------------------------------------------------------
Special Offer -- Download ArcSight Logger for FREE!
Finally, a world-class log management solution at an even better 
price-free! And you'll get a free "Love Thy Logs" t-shirt when you
download Logger. Secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsisghtdev2dev
_______________________________________________
Geomoose-users mailing list
Geomoose-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geomoose-users


 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/geomoose-users/attachments/20110906/824ea840/attachment.html


More information about the Geomoose-users mailing list