<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=iso-8859-1">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:Wingdings;
panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Aptos;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
font-size:12.0pt;
font-family:"Aptos",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
span.EmailStyle19
{mso-style-type:personal-reply;
font-family:"Aptos",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;
mso-ligatures:none;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
/* List Definitions */
@list l0
{mso-list-id:237639215;
mso-list-template-ids:-2139223710;}
@list l0:level1
{mso-level-number-format:bullet;
mso-level-text:\F0B7;
mso-level-tab-stop:.5in;
mso-level-number-position:left;
text-indent:-.25in;
mso-ansi-font-size:10.0pt;
font-family:Symbol;}
@list l0:level2
{mso-level-number-format:bullet;
mso-level-text:o;
mso-level-tab-stop:1.0in;
mso-level-number-position:left;
text-indent:-.25in;
mso-ansi-font-size:10.0pt;
font-family:"Courier New";
mso-bidi-font-family:"Times New Roman";}
@list l0:level3
{mso-level-number-format:bullet;
mso-level-text:\F0A7;
mso-level-tab-stop:1.5in;
mso-level-number-position:left;
text-indent:-.25in;
mso-ansi-font-size:10.0pt;
font-family:Wingdings;}
@list l0:level4
{mso-level-number-format:bullet;
mso-level-text:\F0A7;
mso-level-tab-stop:2.0in;
mso-level-number-position:left;
text-indent:-.25in;
mso-ansi-font-size:10.0pt;
font-family:Wingdings;}
@list l0:level5
{mso-level-number-format:bullet;
mso-level-text:\F0A7;
mso-level-tab-stop:2.5in;
mso-level-number-position:left;
text-indent:-.25in;
mso-ansi-font-size:10.0pt;
font-family:Wingdings;}
@list l0:level6
{mso-level-number-format:bullet;
mso-level-text:\F0A7;
mso-level-tab-stop:3.0in;
mso-level-number-position:left;
text-indent:-.25in;
mso-ansi-font-size:10.0pt;
font-family:Wingdings;}
@list l0:level7
{mso-level-number-format:bullet;
mso-level-text:\F0A7;
mso-level-tab-stop:3.5in;
mso-level-number-position:left;
text-indent:-.25in;
mso-ansi-font-size:10.0pt;
font-family:Wingdings;}
@list l0:level8
{mso-level-number-format:bullet;
mso-level-text:\F0A7;
mso-level-tab-stop:4.0in;
mso-level-number-position:left;
text-indent:-.25in;
mso-ansi-font-size:10.0pt;
font-family:Wingdings;}
@list l0:level9
{mso-level-number-format:bullet;
mso-level-text:\F0A7;
mso-level-tab-stop:4.5in;
mso-level-number-position:left;
text-indent:-.25in;
mso-ansi-font-size:10.0pt;
font-family:Wingdings;}
@list l1
{mso-list-id:1557469687;
mso-list-template-ids:-1567562102;}
@list l1:level1
{mso-level-number-format:bullet;
mso-level-text:\F0B7;
mso-level-tab-stop:.5in;
mso-level-number-position:left;
text-indent:-.25in;
mso-ansi-font-size:10.0pt;
font-family:Symbol;}
@list l1:level2
{mso-level-number-format:bullet;
mso-level-text:o;
mso-level-tab-stop:1.0in;
mso-level-number-position:left;
text-indent:-.25in;
mso-ansi-font-size:10.0pt;
font-family:"Courier New";
mso-bidi-font-family:"Times New Roman";}
@list l1:level3
{mso-level-number-format:bullet;
mso-level-text:\F0A7;
mso-level-tab-stop:1.5in;
mso-level-number-position:left;
text-indent:-.25in;
mso-ansi-font-size:10.0pt;
font-family:Wingdings;}
@list l1:level4
{mso-level-number-format:bullet;
mso-level-text:\F0A7;
mso-level-tab-stop:2.0in;
mso-level-number-position:left;
text-indent:-.25in;
mso-ansi-font-size:10.0pt;
font-family:Wingdings;}
@list l1:level5
{mso-level-number-format:bullet;
mso-level-text:\F0A7;
mso-level-tab-stop:2.5in;
mso-level-number-position:left;
text-indent:-.25in;
mso-ansi-font-size:10.0pt;
font-family:Wingdings;}
@list l1:level6
{mso-level-number-format:bullet;
mso-level-text:\F0A7;
mso-level-tab-stop:3.0in;
mso-level-number-position:left;
text-indent:-.25in;
mso-ansi-font-size:10.0pt;
font-family:Wingdings;}
@list l1:level7
{mso-level-number-format:bullet;
mso-level-text:\F0A7;
mso-level-tab-stop:3.5in;
mso-level-number-position:left;
text-indent:-.25in;
mso-ansi-font-size:10.0pt;
font-family:Wingdings;}
@list l1:level8
{mso-level-number-format:bullet;
mso-level-text:\F0A7;
mso-level-tab-stop:4.0in;
mso-level-number-position:left;
text-indent:-.25in;
mso-ansi-font-size:10.0pt;
font-family:Wingdings;}
@list l1:level9
{mso-level-number-format:bullet;
mso-level-text:\F0A7;
mso-level-tab-stop:4.5in;
mso-level-number-position:left;
text-indent:-.25in;
mso-ansi-font-size:10.0pt;
font-family:Wingdings;}
ol
{margin-bottom:0in;}
ul
{margin-bottom:0in;}
--></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" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt">Hi Lars: Hmmm… I see what you mean but I can’t think of anything easy offhand. We’d almost want a TOLERANCE MARKER option where you’d create dynamic features from the placed markers first and then query those
instead of the underlying points. Or perhaps allow tolerance to be defined with a dx/dy or even a simple polygon in the case where a layer is a point feature.
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">If you’re using PostGIS, I wonder if you could create a query-only polygon layer from the point layer. That is, basically create a rectangle from the point based on the map extent, size or scale and then you
query that instead – same attributes and everything working off a derived geometry.
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt">--Steve<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> MapServer-users <mapserver-users-bounces@lists.osgeo.org>
<b>On Behalf Of </b>Lars Baum via MapServer-users<br>
<b>Sent:</b> Friday, November 15, 2024 3:52 AM<br>
<b>To:</b> mapserver-users@lists.osgeo.org<br>
<b>Subject:</b> [MapServer-users] Custom Click Tolerance Shape for GFI Requests<o:p></o:p></span></p>
</div>
</div>
<div>
<div>
<p><span style="font-family:"Arial",sans-serif">Dear MapServer Community,</span><span style="font-size:10.5pt;font-family:"Arial",sans-serif"><o:p></o:p></span></p>
<p><span style="font-family:"Arial",sans-serif">we have faced an issue with the click tolerance for WMS GetFeatureInfo requests when using custom map symbols. We use a custom .svg vector image to display points in most of our maps.<br>
As I understand it, the TOLERANCE parameter only defines a radius around the point. Therefore the shape of the clickable area is always a circle.<br>
This does not match our symbol at all and results in a bad user experience. Essentially, only the very tip of the image is actually clickable.</span><span style="font-size:10.5pt;font-family:"Arial",sans-serif"><o:p></o:p></span></p>
<p><span style="font-family:"Arial",sans-serif">I have created a demo page for demonstration purposes. Please visit
<a href="https://koelngis.stadt-koeln.de/koelngis/portale/mapServerClickTolerance/" target="_blank">
https://koelngis.stadt-koeln.de/koelngis/portale/mapServerClickTolerance/</a> to experience this problem yourself.</span><span style="font-size:10.5pt;font-family:"Arial",sans-serif"><o:p></o:p></span></p>
<ul type="disc">
<li class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;mso-list:l0 level1 lfo1">
<span style="font-family:"Arial",sans-serif">The layer with orange symbols is a WMS layer that demonstrates the problem I described above. It is terrible to work with since most users instinctively click on the white circle but actually have to click the tip
to get a GFI response. I have added an additional point layer that shows the clickable area defined by the TOLERANCE setting.<o:p></o:p></span></li></ul>
<ul type="disc">
<li class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;mso-list:l1 level1 lfo2">
<span style="font-family:"Arial",sans-serif">The layer with blue symbols is a WFS layer that works perfectly fine (since the click is handled client-side). This is the desired behavior for WMS requests as well. We cannot always use WFS due to client performance
constraints.<o:p></o:p></span></li></ul>
<p><span style="font-family:"Arial",sans-serif">We would like to configure the MapServer so that the entire shape can be clicked precisely. However, we could not find this capability in the documentation. Please let us know if it is possible.<br>
Offsetting the symbol so that the white circle matches the clickable point is not an option because then the tip would indicate that the feature is at a different location.</span><span style="font-size:10.5pt;font-family:"Arial",sans-serif"><o:p></o:p></span></p>
<p><span style="font-family:"Arial",sans-serif">If it i<span style="color:#333333;background:white">s in fact not possible and any commercial service providers are reading this mailing list:</span></span><span style="font-size:10.5pt;font-family:"Arial",sans-serif"><o:p></o:p></span></p>
<p><span style="font-family:"Arial",sans-serif;color:#333333;background:white">Feel free to send me a quote to
<a href="mailto:opensource-mapserver@larsbaum.slmail.me" target="_blank">opensource-mapserver@larsbaum.slmail.me</a>. We would like to pay someone to contribute this functionality for .svg vector images to the MapServer open source project.</span><span style="font-size:10.5pt;font-family:"Arial",sans-serif"><o:p></o:p></span></p>
<p><span style="font-family:"Arial",sans-serif">For reference, this is how we configure the symbol in the mapfile:</span><span style="font-size:10.5pt;font-family:"Arial",sans-serif"><o:p></o:p></span></p>
<p><span style="font-family:"Arial",sans-serif"> </span><span style="font-size:10.5pt;font-family:"Arial",sans-serif"><o:p></o:p></span></p>
<p><span style="font-size:10.5pt;font-family:"Arial",sans-serif"> SYMBOL
<o:p></o:p></span></p>
<p><span style="font-size:10.5pt;font-family:"Arial",sans-serif"> NAME "droplet"<o:p></o:p></span></p>
<p><span style="font-size:10.5pt;font-family:"Arial",sans-serif"> TYPE SVG<o:p></o:p></span></p>
<p><span style="font-size:10.5pt;font-family:"Arial",sans-serif"> IMAGE "../svg/dropletShape.svg" # You can grab a similar .svg file from the website linked above.<o:p></o:p></span></p>
<p><span style="font-size:10.5pt;font-family:"Arial",sans-serif"> ANCHORPOINT 0.5 1 # Make sure the tip of the shape is centered on the point<o:p></o:p></span></p>
<p><span style="font-size:10.5pt;font-family:"Arial",sans-serif"> END<o:p></o:p></span></p>
<p><span style="font-size:10.5pt;font-family:"Arial",sans-serif"> <o:p></o:p></span></p>
<p><span style="font-size:10.5pt;font-family:"Arial",sans-serif"># …<o:p></o:p></span></p>
<p><span style="font-size:10.5pt;font-family:"Arial",sans-serif"> <o:p></o:p></span></p>
<p><span style="font-size:10.5pt;font-family:"Arial",sans-serif"> TOLERANCEUNITS pixels<o:p></o:p></span></p>
<p><span style="font-size:10.5pt;font-family:"Arial",sans-serif"> TOLERANCE 10 # Radius of the clickable circle around the point<o:p></o:p></span></p>
<p style="text-indent:35.4pt"><span style="font-size:10.5pt;font-family:"Arial",sans-serif">CLASS<o:p></o:p></span></p>
<p><span style="font-size:10.5pt;font-family:"Arial",sans-serif"> NAME "Some Name"<o:p></o:p></span></p>
<p><span style="font-size:10.5pt;font-family:"Arial",sans-serif"> STYLE<o:p></o:p></span></p>
<p><span style="font-size:10.5pt;font-family:"Arial",sans-serif"> SYMBOL "droplet"<o:p></o:p></span></p>
<p><span style="font-size:10.5pt;font-family:"Arial",sans-serif"> SIZE 40<o:p></o:p></span></p>
<p><span style="font-size:10.5pt;font-family:"Arial",sans-serif"> END<o:p></o:p></span></p>
<p><span style="font-size:10.5pt;font-family:"Arial",sans-serif"> END<o:p></o:p></span></p>
<p><span style="font-family:"Arial",sans-serif;color:#333333;background:white"> </span><span style="font-size:10.5pt;font-family:"Arial",sans-serif"><o:p></o:p></span></p>
<p><span style="font-family:"Arial",sans-serif;color:#333333;background:white">Thank you very much for your help!</span><span style="font-size:10.5pt;font-family:"Arial",sans-serif"><o:p></o:p></span></p>
<p><span style="font-family:"Arial",sans-serif;color:#333333;background:white"> </span><span style="font-size:10.5pt;font-family:"Arial",sans-serif"><o:p></o:p></span></p>
<p><span style="font-family:"Arial",sans-serif;color:#333333;background:white">Yours sincerely</span><span style="font-size:10.5pt;font-family:"Arial",sans-serif"><o:p></o:p></span></p>
<p><span style="font-family:"Arial",sans-serif;color:#333333;background:white">Lars Baum<br>
GIS Developer</span><span style="font-size:10.5pt;font-family:"Arial",sans-serif"><o:p></o:p></span></p>
<p><span style="font-family:"Arial",sans-serif;color:#333333;background:white">City of Cologne - The Lord Mayor</span><span style="font-size:10.5pt;font-family:"Arial",sans-serif"><o:p></o:p></span></p>
<p><span style="font-family:"Arial",sans-serif;color:#333333;background:white">Office for Information Processing
<br>
Competence Center Geoinformationsystems</span><span style="font-size:10.5pt;font-family:"Arial",sans-serif"><o:p></o:p></span></p>
<p><span style="font-family:"Arial",sans-serif;color:#333333;background:white">Auf dem Hunnenrücken 3<br>
50668 Cologne, Germany</span><span style="font-size:10.5pt;font-family:"Arial",sans-serif"><o:p></o:p></span></p>
<p><span style="font-family:"Arial",sans-serif;color:#333333;background:white">Mail:
<a href="mailto:opensource-mapserver@larsbaum.slmail.me" target="_blank">opensource-mapserver@larsbaum.slmail.me</a><br>
Note: I'm using an alias mail to protect my business mail account from spam.</span><span style="font-size:10.5pt;font-family:"Arial",sans-serif"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:"Arial",sans-serif"><o:p> </o:p></span></p>
</div>
</div>
</div>
</body>
</html>