[Geomoose-users] how to set SRS in Geomoose 3
James Klassen
klassen.js at gmail.com
Wed Nov 4 05:18:40 PST 2020
In GeoMoose 3, the map is (so far anyway) always in 3857.
There are conversion functions for dealing with services that expect
different projections and for converting to/from different projections for
user interaction.
You can use app.bboxToMeters(west, south, east, north) to convert from
lat/lon to 3857 which can then be passed in for extent.
I don't know if there are currently similar functions for arbitrary
projections (if there isn't yet, that is something that we should probably
add).
This would all be configured in app.js. Setting the projection in the
mapbook was a GeoMoose 2 thing and isn't part of GeoMoose 3.
On Wed, Nov 4, 2020, 03:01 flavio rigolon <flavio.rigolon at gmail.com> wrote:
> Hy all,
> I saw that in previous Gemoose 2 version there was a configuration
> parameter in mapbook.xml to change map projection [1] like:
>
> <param name="projection">EPSG:3857</param>
>
> I'll try to insert my custom parameter between a new created
> <configuration> tag:
>
> <param name="projection">EPSG:3003</param> (projection referred to west
> Italy)
>
> and in app.js file I added:
>
> app.addProjection({
> ref: 'EPSG:3003',
> def: '+proj=tmerc +lat_0=0 +lon_0=9 +k=0.9996 +x_0=1500000
> +y_0=0 +ellps=intl +units=m +no_defs'
> });
>
> and then:
>
> app.registerAction('fullextent', ZoomToAction, {
> // extent: [-10742765,5398288,-9920914,6310641]
> extent: [1685000,5038000,1692400,5049400]
> });
>
> but it seems Geomoose always takes the coordinate in the default
> reference system: at startup the map in centered on the coordinates
> I've set in app.js fullextent but they are interpreted in different
> EPSG than 3003 I'd like to be.
> Is new Geomoose 3 mapbook.xml version working like the previous one or
> have I to edit other files/parameter?
>
> Sorry for my poor english and thanks for any suggestions
> Sincerely
> flavio
>
> [1] https://docs.geomoose.org/2.9/workshops/umgeocon2016/ex6.html
>
> --
> /"\ ASCII Ribbon Campaign
> \ / Respect for low technology.
> X Keep e-mail messages readable by any computer system.
> / \ Keep it ASCII.
> _______________________________________________
> Geomoose-users mailing list
> Geomoose-users at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/geomoose-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geomoose-users/attachments/20201104/6e1dc7b7/attachment.html>
More information about the Geomoose-users
mailing list