<div dir="auto"><div dir="auto">I might be missing something here, but I suspect you may be mixing GeoMoose 2.9 and 3.x here.</div><div dir="auto"><br></div><div dir="auto">In 3.x the highlighting would generally be done client side (as an example take a look at services/search.js which does so by adding vector features to the results/results layer) rather than the MapServer tricks used by 2.9.</div><div dir="auto"><br></div><div dir="auto">(That isn't to say it would be impossible implement the MapServer tricks in 3.x, but it isn't how the demo works and I don't know how to do so off the top of my head.)</div><div dir="auto"><br></div><div dir="auto"><br><div class="gmail_quote" dir="auto"><div dir="ltr">On Wed, Nov 28, 2018, 12:08 Colas, Scott <<a href="mailto:Scott.Colas@ct.gov">Scott.Colas@ct.gov</a> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





<div bgcolor="white" lang="EN-US" link="blue" vlink="purple">
<div class="m_7216250663002478140WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Inside my new function “myZoomTo” is there a way I can highlight that specific area I am  zooming to.
<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">My plan was to use runtime substitution and filter my map file to only highlight a specific one. But Im not sure where I can append to the url before it makes
 the request.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Thanks,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">Scott<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<div>
<div style="border:none;border-top:solid #b5c4df 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext"> Geomoose-users [mailto:<a href="mailto:geomoose-users-bounces@lists.osgeo.org" target="_blank" rel="noreferrer">geomoose-users-bounces@lists.osgeo.org</a>]
<b>On Behalf Of </b>Jim Klassen<br>
<b>Sent:</b> Wednesday, November 28, 2018 12:55 PM<br>
<b>To:</b> Reynolds, Michael J. (MNIT)<br>
<b>Cc:</b> GeoMOOSE Users List<br>
<b>Subject:</b> Re: [Geomoose-users] Geomoose 3 onclick action<u></u><u></u></span></p>
</div>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal" style="margin-bottom:12.0pt">It looks like app.zoomToExtent() takes an extent and projection and app.zoomTo() takes a point (in lat/lon), and zoom level, but no projection.  This seems like it might be a bit on an oversight, but in the
 meantime gm3.util.projectFeatures() is available from services.  Paring that with app.zoomTo(point, zoom_level) looks like it would work.<br>
<br>
You could do this in the template directly or add a helper function in your app.js.<br>
<br>
Say something like (untested):<br>
<br>
function myZoomTo(in_point, projection, zoom) {<br>
  var point = gm3.util.projectFeatures([point], projection, 'EPSG:4326')[0];<br>
  return app.zoomTo(point, zoom);<br>
}<br>
<br>
<br>
then call it from the template as:<br>
<br>
myZoomTo({geometry.coordinates: [x, y]}, 'EPSG:26915', 16);<br>
<br>
I'm not sure that using the global space for myZoomTo is best practice, but just an idea to get started.<br>
<br>
I am also remembering something now about the search templates being able to reproject points, but it looks like that is using properties.boundedBy and app.zoomToExtent, so that might not apply.<br>
<br>
<br>
<u></u><u></u></p>
<div>
<p class="MsoNormal">On 11/28/2018 11:18 AM, Reynolds, Michael J. (MNIT) wrote:<u></u><u></u></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">The onClick would be in a search template used for rendering search results.  Once rendered and displayed to the user, the user could click the <a> and the
 onClick would execute the function to zoom to the location.</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><div class="search-result"></span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">                <div class="search-label"></span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">                                {{ <a href="http://properties.name" target="_blank" rel="noreferrer">properties.name</a> }}     </div></span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">                <div class="search-action"></span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">                                <div style="padding: 2px"></span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">                                                <a onclick='app.zoomToCoordinates([{{ geometry.coordinates.0 }},{{ geometry.coordinates.1 }}], 26915, 16)' class="zoomto-link"></span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">                                                                <i class="fa fa-search"></i>
</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">                                                                Zoom!</span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">                                                </a></span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">                                </div></span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">                </div></span><u></u><u></u></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"></div></span><u></u><u></u></p>
<p class="MsoNormal"><a name="m_7216250663002478140__MailEndCompose" rel="noreferrer"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"> </span></a><u></u><u></u></p>
<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""> James Klassen [<a href="mailto:klassen.js@gmail.com" target="_blank" rel="noreferrer">mailto:klassen.js@gmail.com</a>]
<br>
<b>Sent:</b> Wednesday, November 28, 2018 10:44 AM<br>
<b>To:</b> Reynolds, Michael J. (MNIT) <a href="mailto:mike.reynolds@state.mn.us" target="_blank" rel="noreferrer">
<mike.reynolds@state.mn.us></a><br>
<b>Cc:</b> GeoMOOSE Users List <a href="mailto:geomoose-users@lists.osgeo.org" target="_blank" rel="noreferrer"><geomoose-users@lists.osgeo.org></a><br>
<b>Subject:</b> Re: [Geomoose-users] Geomoose 3 onclick action</span><u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<div>
<p class="MsoNormal">I'm lost.  Where is the onClick coming from (DOM element, general description, ...)?<u></u><u></u></p>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">I know you can create a service that asks the user to click a point on the map and returns the coordinate, etc.  You can call the app.* from the HTML returned by the service rendering template (and maybe even earlier) without worrying about
 react/dispatch/etc.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">I am working on a jump to USNG coordinate service in a branch on my fork (klassenjs/gm3) that does both of the above.<u></u><u></u></p>
</div>
</div>
<p class="MsoNormal"> <u></u><u></u></p>
<div>
<p class="MsoNormal">On Tue, Nov 27, 2018, 06:39 Reynolds, Michael J. (MNIT) <<a href="mailto:mike.reynolds@state.mn.us" target="_blank" rel="noreferrer">mike.reynolds@state.mn.us</a> wrote:<u></u><u></u></p>
</div>
<div>
<div>
<p class="MsoNormal">We're trying to create an onClick() event that passes coordinates, srid, and zoom level in and moves the map to that location.<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal">It seems like the onClick event would need to create an action loaded with the parameters, register and then dispatch or run it, so would that be a  function we create in our app's
 app.js?  <u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal">Plus we would then need to create the zoom action which we would like to transform the coordinates from in-srid to web Mercator and then move the map.  Are Proj and mapActions available
 to actions at runtime?  <u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal">onClick => app.zoomToCoordinates() => dispatch ZoomToCoordinates action to transform coordinates and move map.<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal">There's a gm3 zoomTo() function now but it expects lat,lon.  We're not currently modifying any of the core geomoose 3 code and hoping to be able to add this modification to our
 app's part of the code.<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal">Open to any ideas, even scrapping this procedure with a shorter one if there's a way to control the map without dispatching an action but that would mean the js function somehow
 needs access to the app Proj library and map object. Right?<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<p class="MsoNormal"><b><span style="color:#003865;letter-spacing:.3pt">Michael Reynolds</span></b><u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
</div>
<p class="MsoNormal">_______________________________________________<br>
Geomoose-users mailing list<br>
<a href="mailto:Geomoose-users@lists.osgeo.org" target="_blank" rel="noreferrer">Geomoose-users@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/geomoose-users" target="_blank" rel="noreferrer">https://lists.osgeo.org/mailman/listinfo/geomoose-users</a><u></u><u></u></p>
</blockquote>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div>

</blockquote></div></div></div>