<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
It would be nice to have it posted as a bug.<br>
You don't have to find the solution before posting the bug :)<br>
<br>
If it turns out it is related to some local stuff on your machine <br>
some developer will probably ask for details later or delete the bug.<br>
<pre class="moz-signature" cols="72">
Regards, Kenneth, GEOGRAF A/S
</pre>
<br>
<br>
Ismael Cams skrev:
<blockquote cite="mid:11858505.post@talk.nabble.com" type="cite">
  <pre wrap="">Hello,

I was able to isolate the problem. In the layout that was causing the
problem I turned on the legend, but disabled the properties pane. After done
another test in the MapGuide Studio I noticed it was causing the same
problem when turning off the properties pane and enable the legend.
I did not investigate if this is a general problem or if it is specific for
the situation I am encountering.

Is this sufficient to report a bug (problem with selection of features on
pointlayer when legend is enabled and properties pane disabled) ?

Thanks for the help Kenneth, it pointed me in the direction of the final
solution.

Kind regards,
Ismaël


Kenneth, GEOGRAF A/S wrote:
  </pre>
  <blockquote type="cite">
    <pre wrap="">I belive that the function you should examine is this:

    function ScreenToMapUnits2(x, y, bAllowOutsideWindow)
    {
        if(!bAllowOutsideWindow)
        {
            if(x &gt; mapDevW - 1) x = mapDevW - 1;
            else if(x &lt; 0) x = 0;

            if(y &gt; mapDevH - 1) y = mapDevH - 1;
            else if(y &lt; 0) y = 0;
        }

        x = extX1 + (extX2 - extX1) * (x / mapDevW);
        y = extY1 - (extY1 - extY2) * (y / mapDevH);
        return new Point(x, y);
    }

You then have to determine if it is extY1, extY2 or mapDevH that is wrong.
Once you find that out, you should examine areas where they get 
calculated, to further narrow it down.

Regards, Kenneth, GEOGRAF A/S



Ismael Cams skrev:
    </pre>
    <blockquote type="cite">
      <pre wrap="">Thanks for the answer Kenneth.

I have checked the coordinates and they are indeed skewed. The x
coordinates
are ok, but the y coordinates do not match (which explains why I have to
click somewhat above the point in order to select it). As soon as I
resize
the legend frame the coordinates get ok.

The MCS part is not clear to me. Can I somehow make changes to this
functions in order to solve the problem or can I try something else
(without
having to disable my legend) ? 

For your notice: I make also selections programatically. This works fine
in
all cases. 


Kenneth, GEOGRAF A/S wrote:
  
      </pre>
      <blockquote type="cite">
        <pre wrap="">I would say that the offset is likely caused by something incorrect on 
the html side.
If point 7 means: create 2 layouts in studio and test them in the same
app,
it would appear that a setting in the WebLayout file causes the html to 
report bad map offsets.

You might see the actual coordinats being sent, by inserting an 
"alert(...)" in ajaxmappane.templ,
where it builds the polygon (search for "POLYGON").

If the coordinates are correct (ea. the same), I have no clue.

If the coordinates are skewed, look in the ajaxmappane.templ,
for the function that calculates the MCS coordinates from screen (x,y).
That functions has some offsets, and it is my guess that they slip a
bit.

Regards, Kenneth, GEOGRAF A/S



Ismael Cams skrev:
    
        </pre>
        <blockquote type="cite">
          <pre wrap="">I have following situation:

1. I build dynamically two weblayouts in a session. One is containing a
legend, the other one is only containing the zoom control.
2. The weblayouts refer to the same mapdefinition that is also build in
a
session.
3. The mapdefinition is referring to a point layer (sessionlayer)
4. Making a selection in the weblayout without legend works fine.
5. Making a selection in the weblayout with legend does not work
correctly.
I have to click above the point to actually make the selection.
6. When I minimize the legend frame (by using the arrow in the
webbrowser)
the selection suddenly works correctly. Also when I disable the legend
in
the first layout this is also working fine.
7. When I create the same scenario with Studio I do not encounter the
problem (selection is working without problems).

I believe it has something to do with using the same session, but I do
not
have a clue where to look after. Can someone give me hints about what
could
be the problem ?

Kind regards,
Ismaël
  
      
          </pre>
        </blockquote>
        <pre wrap="">_______________________________________________
mapguide-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:mapguide-users@lists.osgeo.org">mapguide-users@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/mapguide-users">http://lists.osgeo.org/mailman/listinfo/mapguide-users</a>


    
        </pre>
      </blockquote>
      <pre wrap="">  
      </pre>
    </blockquote>
    <pre wrap="">_______________________________________________
mapguide-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:mapguide-users@lists.osgeo.org">mapguide-users@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/mapguide-users">http://lists.osgeo.org/mailman/listinfo/mapguide-users</a>


    </pre>
  </blockquote>
  <pre wrap=""><!---->
  </pre>
</blockquote>
</body>
</html>