[fusion-dev] fusion and projection support
Andreas Morf
a.morf at fkl.ch
Wed Oct 7 02:39:48 EDT 2009
The default projection of mgMapOL is set to "EPSG:4326" on line 14636 in
Openlayers.js. If Proj4js is available the initialisation of the OL
projection with the followinge statements (around line 10855)
if (window.Proj4js) {
this.proj = new Proj4js.Proj(projCode);
}
results in this.proj being defined - and finally this leads to my map being
screwed up (wrong scale, extents...) becaus my coords are in another CRS
Andreas
> -----Original Message-----
> From: Mike Adair [mailto:madair at dmsolutions.ca]
> Sent: Tuesday, October 06, 2009 8:09 PM
> To: Andreas Morf
> Cc: fusion-dev at lists.osgeo.org
> Subject: Re: [fusion-dev] fusion and projection support
>
> That change is required so that the Measure widget can work with maps
> in
> various projections, otherwise the distances measured don't make sense
> at all (for both MapServer and MapGuide).
>
> I don't see how that revision would break a MapGuide application,
> perhaps you can explain?
>
> I am working on a patch for MapGuide side of things to set the
> projection automatically. Ideally the MapGuide API would have a way of
> returning the EPSG code for a map and indeed it does have
> $csFactory->ConvertWktToEpsgCode($srs), however I am getting an error
> whenever I try to use that "Could not convert to EPSG code from WKT".
> It
> is for this reason that I put support for that in the Map extension
> element in AppDef. If you can point to a better way of informing the
> client about the EPSG code for the map I would be happy to hear it.
>
> Mike
>
>
>
> Andreas Morf wrote:
> >
> > With rev. 1907 Mike added projection support to fusion - this screwed
> > up my fusion app where I use projected coordinates (swiss grid): the
> > oMapOL was set to default value EPSG:4326 which was the source of
> > malfunction.
> >
> > I normally set the CRS in my MG-mapdefinition and I don't want to set
> > it again in fusion and additionally provide a EPSGxy.js (). Shouldn't
> > fusion read out CRS-def from MG-server mapdef for the actual map and
> > use that for client-side calculations?
> >
> > IMHO 1907 looks a bit like a quick and dirty fix for mapserver
> > concerns - the whole matter shoud be discussed an planned from ground
> > up (RFC?).
> >
> > Greets, Andreas
> >
> > ---------------------------------------------------------------------
> ---
> >
> > _______________________________________________
> > fusion-dev mailing list
> > fusion-dev at lists.osgeo.org
> > http://lists.osgeo.org/mailman/listinfo/fusion-dev
> >
>
> --
> Michael Adair
> Senior Software Architect
> DM Solutions Group Inc.
>
> Office: (613) 565-5056 x26
> madair at dmsolutions.ca
> http://www.dmsolutions.ca
> http://research.dmsolutions.ca
More information about the fusion-dev
mailing list