Dear Andreas
Many Thanks for sending this to me. I apologise but I haven't been able to advance. I have set MapBuilder up but really my understanding of how tools work is not good. I have been able to insert tools into the config.xml file and I understand the concept of models, widgets & tools and how to reference these in the html file. However, I don't understand how the tools/widgets relate to the xsl stylesheets & .js files. Would you be able to expand on what you sent me or guide me to where on the MapBuilder site I need to read? I did find this e-mail in the archives from Pere. Would this be a good method for me to use? Kind Regards & Many Thanks John I don't know exactly the tool you are trying to get (take a look at WfsGetFeature.js, line 16, point=extent.getXY(targetNode.evpl); you can use these techniques to include coords in queries), but to get a new tool in the toolbar you must: -Create your own widget (new.js) in lib/widget and a .xsl file -Declare this widget in your config.xml (take other widgets as examples) -Declare this widget in schemas/config.xsd (I did as mb:EditButtonType) Saludos, Pere ----- Original Message ---- From: Andreas Hocevar <[EMAIL PROTECTED]> To: John Roberts <[EMAIL PROTECTED]> Cc: [email protected] Sent: Thursday, 2 August, 2007 8:22:25 AM Subject: Re: [Mapbuilder-users] How do I create a button which returns xy co-ordinates of click? Robert, On 8/2/07, John Roberts <[EMAIL PROTECTED]> wrote: > I then want to feed the xy coordinates into a function which I have created > in Javascript which sends a xmlhttp request to the geoserver wfs using a > DWithin filter. This function is currently being driven from a html form > button which doesn't allow the trigger event to pick up the xy coordinates. We already had something similar in the mapViewer demo. This is a use case covered by a combination of GetFeatureInfo.js (in the demo/mapViewer folder) and the WebServiceRequest tool. Have a look at config.xml in demo/mapViewer and the xsl stylesheets in lib/tool/xsl, there might already be one for your request type. Maybe it is juat wfs_GetFeature.xsl. You have to specify your request type in the <requestName>. If it is eg. wfs:GetFeature, then wfs_GetFeature.xsl will be used. The ":" will be replaced by "_"; and ".xsl" will be aded. This should help you get started. Again, I do not think that you need to write a custom widget for your use case. Regards, Andreas. ___________________________________________________________ For email that puts you in control, choose Yahoo! Mail. http://uk.docs.yahoo.com/mail/addressguard2.html ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ Mapbuilder-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mapbuilder-users
