<div dir="auto">I'm lost.  Where is the onClick coming from (DOM element, general description, ...)?<div dir="auto"><br></div><div dir="auto">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.</div><div dir="auto"><br></div><div dir="auto">I am working on a jump to USNG coordinate service in a branch on my fork (klassenjs/gm3) that does both of the above.</div></div><br><div class="gmail_quote"><div dir="ltr">On Tue, Nov 27, 2018, 06:39 Reynolds, Michael J. (MNIT) <<a href="mailto:mike.reynolds@state.mn.us">mike.reynolds@state.mn.us</a> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





<div lang="EN-US" link="#0563C1" vlink="#954F72">
<div class="m_-2931686265445524644WordSection1">
<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><span style="font-size:10.0pt"><u></u><u></u></span></p>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div>

_______________________________________________<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" rel="noreferrer noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/geomoose-users</a></blockquote></div>