[Cartoweb-users] query by point

Valerio Noti valerionoti at yahoo.it
Mon Jan 30 10:33:28 EST 2006


Thank you Pierre,
it works

Valerio



----- Original Message ----- 
From: "Pierre GIRAUD" <pierre.giraud at camptocamp.com>
Cc: <cartoweb-users at lists.maptools.org>
Sent: Monday, January 30, 2006 3:56 PM
Subject: Re: [Cartoweb-users] query by point


> Valerio Noti a écrit :
>
>> Hello,
>> is it possible to use a query by point tool instead of query by rectangle 
>> available in demo projects?
>> I'd like to not allow user to draw a rectangle query but just a query 
>> click.
>>
>> Thanks in advance
>>
>> Valerio
>> _______________________________________________
>> Cartoweb-users mailing list
>> Cartoweb-users at lists.maptools.org
>> http://lists.maptools.org/mailman/listinfo/cartoweb-users
>
> If your current dhtmlInit.js looks like :
>
> [...]
> Map.prototype.query = function(aDisplay) {
>  this.zoomin(aDisplay);
>  this.getDisplay(aDisplay).docObj.style.cursor = "help";
> };
> [...]
>
> the quickest way to change the query tool behavior is to copy dhtmlInit.js 
> in your project/htdocs/js folder and to modify it to :
>
> [...]
> Map.prototype.query = function(aDisplay) {
>  this.zoomout(aDisplay);
>  this.getDisplay(aDisplay).docObj.style.cursor = "help";
> };
> [...]
>
> This will give the query tool the same behavior as the zoomout one.
>
>
> But it should be better (cleaner) to have another tool in the query plugin 
> (queryByPoint for example), that could be loaded in the toolbar (plugin 
> extension ?). For that, a new tooldescription has to be added to the 
> handleMainmapTool() function in the query coreplugin.
> In the dhtmlInit.js code, you also need to have a new prototype for 
> queryByPoint looking like :
>
> [...]
> Map.prototype.querybyPoint = function(aDisplay) {
>  this.zoomout(aDisplay);
>  this.getDisplay(aDisplay).docObj.style.cursor = "help";
> };
> [...]
>
> Hope this is clear.
>
>
> Pierre GIRAUD
>
>
> -- 
> _________________________________________________________
> Pierre GIRAUD
> Géomaticien, Analyste
>
> Camptocamp France SAS
> Savoie Technolac, BP 352
> 73377 Le Bourget du Lac, Cedex
> Tel : 00 33 4 79 44 44 93
> Mail : pierre.giraud at camptocamp.com
> http://www.camptocamp.com
>
> _______________________________________________
> Cartoweb-users mailing list
> Cartoweb-users at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/cartoweb-users
>
>
> -- 
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.1.375 / Virus Database: 267.14.23/243 - Release Date: 
> 27/01/2006
>
> 



More information about the Cartoweb-users mailing list