<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p style="margin-top:0;margin-bottom:0">There are certain pieces of a mapfile that can be set via URL. Typically only values doing type validation in the parser. Anything else would require validation and some things are simply not mutable (which is where substitution
comes in). This approach doesn't use substitution - you're actually passing a bit mapfile syntax. Something like this would work:</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0"> <a href="http://localhost/cgi-bin/mapserv?map=...&map.layer['mypoint']=FEATURE+POINTS+100+100+END+END" class="OWAAutoLink" id="LPlnk356638" previewremoved="true">
http://localhost/cgi-bin/mapserv?map=...&map.layer['mypoint']=FEATURE+POINTS+100+100+END+END</a></p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">The variable name identifies the object being tweaked. The value is straight mapfile syntax. I'll have to look around a bit and see if I have any live examples on our site.</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">--Steve</p>
</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> mapserver-users <mapserver-users-bounces@lists.osgeo.org> on behalf of Yves Jacolin <yves.jacolin@camptocamp.com><br>
<b>Sent:</b> Monday, January 22, 2018 3:01:51 AM<br>
<b>To:</b> Andrea Peri<br>
<b>Cc:</b> mapserver-users@lists.osgeo.org<br>
<b>Subject:</b> Re: [mapserver-users] How add a point remotelly</font>
<div> </div>
</div>
<div>
<div dir="ltr">
<div>
<div>Hello Andrea<span class="x_gmail-HOEnZb"><font color="#888888">,</font></span><br>
<br>
</div>
You can't, only few parameters can be used for such ontime subsitution, see the section:
<a href="http://mapserver.org/cgi/runsub.html#parameters-supported">http://mapserver.org/cgi/runsub.html#parameters-supported</a><br>
</div>
<div><br>
</div>
<div>Regards,</div>
<div><br>
</div>
Y.<br>
</div>
<div class="x_gmail_extra"><br>
<div class="x_gmail_quote">2018-01-21 11:41 GMT+01:00 Andrea Peri <span dir="ltr">
<<a href="mailto:aperi2007@gmail.com" target="_blank">aperi2007@gmail.com</a>></span>:<br>
<blockquote class="x_gmail_quote" style="margin:0 0 0 .8ex; border-left:1px #ccc solid; padding-left:1ex">
<div dir="ltr">
<div>
<div>
<div>Hi Jukka,<br>
<br>
</div>
Your is a good idea.<br>
I try it ,<br>
<br>
</div>
The fragment I try is this:<br>
<br>
TYPE POINT<br>
PROJECTION<br>
"+init=epsg:3003"<br>
END<br>
EXTENT 1530000 4665000 1800000 4950000<br>
VALIDATION<br>
'coordinates' '^[-a-zA-Z0-9_.\=#\'&%() ]+$'<br>
'default_coordinates' '1650000 4800000'<br>
END<br>
FEATURE<br>
POINTS<br>
%coordinates% <-- line 593 of my mapfile.<br>
END<br>
END<br>
<br>
<br>
</div>
But unfortunally the mapserver report always the error.<br>
<br>
[Sun Jan 21 11:36:26 2018].660 loadFeaturePoints(): Unknown identifier. Parsing error near (%):(line 593)<br>
<br>
<br>
<br>
</div>
<div class="x_HOEnZb">
<div class="x_h5">
<div class="x_gmail_extra"><br>
<div class="x_gmail_quote">2018-01-21 11:22 GMT+01:00 Rahkonen Jukka (MML) <span dir="ltr">
<<a href="mailto:jukka.rahkonen@maanmittauslaitos.fi" target="_blank">jukka.rahkonen@<wbr>maanmittauslaitos.fi</a>></span>:<br>
<blockquote class="x_gmail_quote" style="margin:0 0 0 .8ex; border-left:1px #ccc solid; padding-left:1ex">
<div>
<div>
<div style="font-family:Calibri,sans-serif; font-size:11pt">I would try first with one variable %coordinates% for avoiding possible problem because of subsequent % signs.<br>
<br>
-Jukka Rahkonen-</div>
</div>
<div dir="ltr">
<hr>
<span style="font-family:Calibri,sans-serif; font-size:11pt; font-weight:bold">Lähettäjä:
</span><span style="font-family:Calibri,sans-serif; font-size:11pt"><a href="mailto:aperi2007@gmail.com" target="_blank">Andrea Peri</a></span><br>
<span style="font-family:Calibri,sans-serif; font-size:11pt; font-weight:bold">Lähetetty:
</span><span style="font-family:Calibri,sans-serif; font-size:11pt">21.1.2018 11:58</span><br>
<span style="font-family:Calibri,sans-serif; font-size:11pt; font-weight:bold">Vastaanottaja:
</span><span style="font-family:Calibri,sans-serif; font-size:11pt"><a href="mailto:mapserver-users@lists.osgeo.org" target="_blank">mapserver-users@lists.osgeo.or<wbr>g</a></span><br>
<span style="font-family:Calibri,sans-serif; font-size:11pt; font-weight:bold">Aihe:
</span><span style="font-family:Calibri,sans-serif; font-size:11pt">[mapserver-users] How add a point remotelly</span><br>
<br>
</div>
<div>
<div class="x_m_-7074505779682294187h5">
<div>
<div dir="ltr">
<div>
<div>Hi,<br>
</div>
Is possible to use the runtime-substitution to add a point into a map layer ?<br>
</div>
<br>
<div>
<div>
<div>I try this, but it do error.</div>
<div><br>
</div>
<div>FEATURE</div>
<div> POINTS</div>
<div> %coord_est% %coord_north%</div>
</div>
<div><br>
</div>
<div>The log report me: "unknow % char"</div>
<div><br>
</div>
<div>Many thx.<br>
</div>
<div>
<div><br>
</div>
<div>-- <br>
<div class="x_m_-7074505779682294187m_-8165472980076857748gmail_signature">-----------------<br>
Andrea Peri<br>
. . . . . . . . . <br>
qwerty àèìòù<br>
-----------------<br>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<br>
<br clear="all">
<br>
-- <br>
<div class="x_m_-7074505779682294187gmail_signature">-----------------<br>
Andrea Peri<br>
. . . . . . . . . <br>
qwerty àèìòù<br>
-----------------<br>
</div>
</div>
</div>
</div>
<br>
______________________________<wbr>_________________<br>
mapserver-users mailing list<br>
<a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.<wbr>org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/mapserver-users" rel="noreferrer" target="_blank">https://lists.osgeo.org/<wbr>mailman/listinfo/mapserver-<wbr>users</a><br>
</blockquote>
</div>
<br>
<br clear="all">
<br>
-- <br>
<div class="x_gmail_signature">
<div dir="ltr">
<div>
<div dir="ltr">
<div>
<div dir="ltr">
<div>
<div dir="ltr">
<div>Training and support manager<br>
Camptocamp France SAS<br>
Bâtiment le Dauphin - 1er étage<br>
18 rue du Lac Saint André<br>
73382 Le Bourget-du Lac<br>
<br>
Tel (France) : +33 4 58 48 20 43<br>
Tel (Switzerland) : +41 21 619 10 43<br>
Mob. : +33 6 18 75 42 21<br>
<br>
email : <a href="mailto:yves.jacolin@camptocamp.com" target="_blank">yves.jacolin@camptocamp.com</a><br>
<a href="http://www.camptocamp.com" target="_blank">http://www.camptocamp.com</a></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>