[Geomoose-users] Geomoose 3 onclick action

Reynolds, Michael J. (MNIT) mike.reynolds at state.mn.us
Tue Nov 27 04:38:52 PST 2018


We're trying to create an onClick() event that passes coordinates, srid, and zoom level in and moves the map to that location.

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?

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?

onClick => app.zoomToCoordinates() => dispatch ZoomToCoordinates action to transform coordinates and move map.

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.

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?

Michael Reynolds

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geomoose-users/attachments/20181127/d5d91505/attachment.html>


More information about the Geomoose-users mailing list