Overview Map

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Overview Map

Mark Pendergraft
I'm having a problem with the overview map not displaying properly when I have a coordinate system other than LL84 defined for my map.  The overview map seems to have the wrong coordinate system attached to it, which throws off the scale of the overview map and also causes the red rectangle not to show up.

Previously I had an issue with my map not displaying properly (being zoomed out too far, units didn't correspond to my map, etc.) which was resolved by adding a <ProjectionCode> and <ProjectionDef> to the Map element.  However the Overview Map still behaves in the same fashion that the map did prior to adjusting the above settings.  I think the Overview Map is still trying to display my map, which is in EPSG:2926 in the default projection EPSG:4326

Is anyone else experiencing this issue?  And has anyone come up with a workaround that doesn't involve a reprojected copy of the same map?

Thanks.

-Mark P.
Reply | Threaded
Open this post in threaded view
|

Re: Overview Map

Kori Maleski
I have had the same issue.

On line 110 of OverviewMap.js, add the following 2 lines:

        this.mapObject.projection = this.getMap().oMapOL.getProjection()
        this.mapObject.oLayerOL.projection = this.getMap().oMapOL.getProjection()

That will workaround the projection issue.  Haven't fully tested - may need further tweaking.



Cheers,

Kori Maleski

On Wed, Mar 17, 2010 at 12:53 PM, Mark Pendergraft <[hidden email]> wrote:

I'm having a problem with the overview map not displaying properly when I
have a coordinate system other than LL84 defined for my map.  The overview
map seems to have the wrong coordinate system attached to it, which throws
off the scale of the overview map and also causes the red rectangle not to
show up.

Previously I had an issue with my map not displaying properly (being zoomed
out too far, units didn't correspond to my map, etc.) which was resolved by
adding a <ProjectionCode> and <ProjectionDef> to the Map element.  However
the Overview Map still behaves in the same fashion that the map did prior to
adjusting the above settings.  I think the Overview Map is still trying to
display my map, which is in EPSG:2926 in the default projection EPSG:4326

Is anyone else experiencing this issue?  And has anyone come up with a
workaround that doesn't involve a reprojected copy of the same map?

Thanks.

-Mark P.
--
View this message in context: http://n2.nabble.com/Overview-Map-tp4752630p4752630.html
Sent from the Fusion Users mailing list archive at Nabble.com.
_______________________________________________
fusion-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/fusion-users


_______________________________________________
fusion-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/fusion-users
Reply | Threaded
Open this post in threaded view
|

Re: Overview Map

Michael Adair
Are you guys using Fusion trunk?  This is the case of using a separate
map for the overview I assume?

Can I get you to open a ticket for this and target v2.0 as the milestone.

Thanks,

Mike

Kori Maleski wrote:

> I have had the same issue.
>
> On line 110 of OverviewMap.js, add the following 2 lines:
>
>         this.mapObject.projection = this.getMap().oMapOL.getProjection()
>         this.mapObject.oLayerOL.projection =
> this.getMap().oMapOL.getProjection()
>
> That will workaround the projection issue.  Haven't fully tested - may
> need further tweaking.
>
>
>
> Cheers,
>
> Kori Maleski
>
> On Wed, Mar 17, 2010 at 12:53 PM, Mark Pendergraft
> <[hidden email] <mailto:[hidden email]>> wrote:
>
>
>     I'm having a problem with the overview map not displaying properly
>     when I
>     have a coordinate system other than LL84 defined for my map.  The
>     overview
>     map seems to have the wrong coordinate system attached to it,
>     which throws
>     off the scale of the overview map and also causes the red
>     rectangle not to
>     show up.
>
>     Previously I had an issue with my map not displaying properly
>     (being zoomed
>     out too far, units didn't correspond to my map, etc.) which was
>     resolved by
>     adding a <ProjectionCode> and <ProjectionDef> to the Map element.
>      However
>     the Overview Map still behaves in the same fashion that the map
>     did prior to
>     adjusting the above settings.  I think the Overview Map is still
>     trying to
>     display my map, which is in EPSG:2926 in the default projection
>     EPSG:4326
>
>     Is anyone else experiencing this issue?  And has anyone come up with a
>     workaround that doesn't involve a reprojected copy of the same map?
>
>     Thanks.
>
>     -Mark P.
>     --
>     View this message in context:
>     http://n2.nabble.com/Overview-Map-tp4752630p4752630.html
>     Sent from the Fusion Users mailing list archive at Nabble.com.
>     _______________________________________________
>     fusion-users mailing list
>     [hidden email] <mailto:[hidden email]>
>     http://lists.osgeo.org/mailman/listinfo/fusion-users
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> fusion-users mailing list
> [hidden email]
> http://lists.osgeo.org/mailman/listinfo/fusion-users
>  

--
   Michael Adair
   Senior Software Architect
   DM Solutions Group Inc.

   Office: (613) 565-5056 x26
   [hidden email]
   http://www.dmsolutions.ca
   http://research.dmsolutions.ca


_______________________________________________
fusion-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/fusion-users
Reply | Threaded
Open this post in threaded view
|

Re: Overview Map

Mark Pendergraft
I'm using trunk.  There is only 1 map in my AppDef and both the Map and Overview Map reference it.  The map is in EPSG:2926, and has that same projection defined in the AppDef, but the Overview Map doesn't pick up the projection and tries to display itself in LL84 (which is the default OpenLayers projection).  I opened a ticket here:
http://trac.osgeo.org/fusion/ticket/373

Thanks,
-Mark
Reply | Threaded
Open this post in threaded view
|

Re: Overview Map

Kori Maleski
I am using trunk as well.

What I have found is that the OpenLayers.Layer.MapGuide Layer does not hold the proper projection after a map definition has been loaded.   It retains the default 4326  LL84 projection.  The map object itself holds the correct projection - whatever has been set in the MapDefinition in Studio.  This causes no issue until a widget tries to grab the maps projection - such as the overview.

So it is an issue with the OpenLayers.Layer.MapGuide class perhaps?


Cheers,

Kori Maleski

On Thu, Mar 18, 2010 at 9:37 AM, Mark Pendergraft <[hidden email]> wrote:

I'm using trunk.  There is only 1 map in my AppDef and both the Map and
Overview Map reference it.  The map is in EPSG:2926, and has that same
projection defined in the AppDef, but the Overview Map doesn't pick up the
projection and tries to display itself in LL84 (which is the default
OpenLayers projection).  I opened a ticket here:
http://trac.osgeo.org/fusion/ticket/373

Thanks,
-Mark

--
View this message in context: http://n2.nabble.com/Overview-Map-tp4752630p4757603.html
Sent from the Fusion Users mailing list archive at Nabble.com.
_______________________________________________
fusion-users mailing list
[hidden email]


_______________________________________________
fusion-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/fusion-users
Reply | Threaded
Open this post in threaded view
|

Re: Overview Map

elliott17
I am having this issue with MGOS 2.2 on server 2008 IIS 7. The Overview Map is showing the contents in LL where my main map is set to WGS84.PseudoMercator. The OverviewMap.js is shown below. Will the following line of code help in this issue:

this.mapObject.projection = this.getMap().oMapOL.getProjection();
this.mapObject.oLayerOL.projection = this.getMap().oMapOL.getProjection();

loadOverview: function()
    {
        if (this.control) {
          this.control.destroy();
        }

        var layer = this.mapObject.oLayerOL;
        if(layer != null)
        {
            var size = $(this.domObj).getContentBoxSize();
            this.oSize = new OpenLayers.Size(size.width, size.height);
            layer.isBaseLayer = true;
            layer.ratio = 1.0;
            if (layer.singleTile) {
              this.oMapOptions.numZoomLevels = 3;  //TODO: make this configurable?
            }

            var options = {
              div: this.domObj,
              size: this.oSize,
              minRatio: this.nMinRatio,
              maxRatio: this.nMaxRatio,
              mapOptions: this.oMapOptions,
              layers: [layer]
            };

            this.control = new OpenLayers.Control.OverviewMap(options);
            if (size.width == 0 || size.height == 0)
            {
                return;   //don't try to load if the container is not visible
            }
            else
            {
                this.getMap().oMapOL.addControl(this.control);
                this.bDisplayed = true;
            }
            //console.log('OverviewMap mapLoaded');
        }
    },