Cannot upgrade to 2.6 because of vector lines disappearing in IE (Frustrated)

14 messages Options
Embed this post
Permalink
Linda Rawson

Cannot upgrade to 2.6 because of vector lines disappearing in IE (Frustrated)

Reply Threaded More More options
Print post
Permalink
Some javascript/style in this post has been disabled (why?)
I have a problem with upgrading to 2.6.  I need some of the other
features and I cannot get this to work.  I have tried to find out
where in the code it has changed but I cannot find it.

ONLY in IE does this not work.

Extract this example.  You will see a green line and an aqua marker on
the screen.

Push the button that says Zoom 5.

You still have a green line and an aqua marker on the screen.

Push the button that says Zoom 6.

No lines.  Not for Zoom 7 or Zoom 8 either.

I have attached the example but in case it gets stripped.  Here is the example:

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Linda Rawson Test Case</title><link
href="http://www.openlayers.org/api/theme/default/style.css"
rel="stylesheet" type="text/css">
        <style type="text/css">body {
                        color: Black;
                        font-family: Verdana, Arial, Helvetica, sans-serif;
                        margin: 0 auto;
                        padding: 0px;
                        border: 0px;
                        font-size: 10px;
                        background-color: #584E3D;
                }
                .{
                        font-family:Verdana;
                        font-size:10px
                }
                #headerDiv {
                        font-size: 11px;
                        color: #DBCEB8;
                        font-family: Georgia, "Times New Roman", Times, serif;
                        width: 100%;
                        height: 12px;
                }
                .leftPanelheader {
                        height: 28px;
                        color: white;
                        font-weight: normal;
                        background: #4B3624;
                        border-bottom: thin solid #BDB76B;
                        font: 14px;
                }
                .leftTreeTable {
                        font-size: 9px;
                }
                .boxTitleText {
                        float: left;
                        display: block;
                        font-size: 15px;
                        font-family:Georgia,serif;
                        padding-left: 2px;
                        padding-top: 2px;
                }
                .upperLeftBox {
                        height: 300px;
                        background-color: #d0caba;
                }
                .panelFooter {
                        color: white;
                        background: #4B3624;
                }
        #map {
                   width: 720px;
                   height: 720px;
                   border: 1px solid #4B3624;
                        background: White;
                }
        .olControlAttribution { bottom: 0px!important }</style>
<script src="http://www.openlayers.org/api/OpenLayers.js"
type="text/javascript"></script>
<script src='http://maps.google.com/maps?file=api&v=2&key=ABQIAAAAjpkAC9ePGem0lIq5XcMiuhR_wWLPFku8Ix9i2SXYRVK3e45q1BQUd_beF8dtzKET_EteAjPdGDwqpQ'></script>
<script type="text/javascript">var map;

       // avoid pink tiles
       OpenLayers.IMAGE_RELOAD_ATTEMPTS = 3;
       OpenLayers.Util.onImageLoadErrorColor = "transparent";
       
        var vectorRouteLayer, vectorTrailLayer;
        var markerLayer, boxes, newPoint;

        function init(){
                var options = {
                    projection: new OpenLayers.Projection("EPSG:900913"),
                    //displayProjection: new OpenLayers.Projection("EPSG:4326"),
                    units: "m",
                        numZoomLevels: 19,
                    maxResolution: 156543.0339,
                    maxExtent: new OpenLayers.Bounds(-20037508, -20037508,
                                                     20037508, 20037508.34)
                };
                map = new OpenLayers.Map('map', options);
               
                // create Google Mercator layers
                var gmap = new OpenLayers.Layer.Google(
                    "Google Streets",
                    {'sphericalMercator': true}
                );
                map.addLayer(gmap);
               
                map.addControl(new OpenLayers.Control.PanZoomBar());
                map.addControl(new OpenLayers.Control.MousePosition());
               
                vectorRouteLayer = new OpenLayers.Layer.Vector("Routes");
                vectorTrailLayer = new OpenLayers.Layer.Vector("Trails");
                markerLayer = new OpenLayers.Layer.Markers("WayPoints");
               
                map.addLayers([vectorRouteLayer,vectorTrailLayer,markerLayer]);
               
                var style_trail = OpenLayers.Util.extend({},
OpenLayers.Feature.Vector.style['default']);
                var myVectorTrailLayer;
                myVectorTrailLayer = vectorTrailLayer;
                style_trail.strokeColor = "green";
                style_trail.strokeWidth = 5;
                var pointList = [];
                var newPoint;
                newPoint = new OpenLayers.Geometry.Point(-13653735.8487833,5726045.3578081);
                pointList.push(newPoint);
                newPoint = new OpenLayers.Geometry.Point(-13653731.3960036,5726056.5070679);
                pointList.push(newPoint);
                newPoint = new OpenLayers.Geometry.Point(-13653730.8394062,5726044.7207079);
                pointList.push(newPoint);
                newPoint = new OpenLayers.Geometry.Point(-13653743.1958697,5726043.9243328);
                pointList.push(newPoint);
                newPoint = new OpenLayers.Geometry.Point(-13653754.1051798,5726046.9505586);
                pointList.push(newPoint);
                newPoint = new OpenLayers.Geometry.Point(-13653760.4503907,5726056.5070679);
                pointList.push(newPoint);
                newPoint = new OpenLayers.Geometry.Point(-13653767.4635187,5726065.5857612);
                pointList.push(newPoint);
                newPoint = new OpenLayers.Geometry.Point(-13653830.136392,5726052.2066375);
                pointList.push(newPoint);
                newPoint = new OpenLayers.Geometry.Point(-13653846.5003571,5726042.3315828);
                pointList.push(newPoint);
               
                var lineFeature = new OpenLayers.Feature.Vector(
                        new OpenLayers.Geometry.LineString(pointList));
                lineFeature.fid = 52730;
                myVectorTrailLayer.addFeatures(lineFeature);
               
                pointList = [];
                newPoint = new OpenLayers.Geometry.Point(-12250153.3626406,4852001.6114048);
                pointList.push(newPoint);
               
                newPoint = new OpenLayers.Geometry.Point(-12194315.5060664,4800503.5113048);
                pointList.push(newPoint);
                newPoint = new OpenLayers.Geometry.Point(-12180445.0975155,4873109.008858);
                pointList.push(newPoint);
                lineFeature = new OpenLayers.Feature.Vector(
                             new OpenLayers.Geometry.LineString(pointList),null,style_trail);
                lineFeature.fid = 52751;
                myVectorTrailLayer.addFeatures([lineFeature]);
               
                var size = new OpenLayers.Size(15, 15);
                var offset = new OpenLayers.Pixel(-(size.w/2), -size.h);
                var icon = new
OpenLayers.Icon('http://boston.openguides.org/markers/AQUA.png', size,
offset);
                markerLayer.addMarker(new OpenLayers.Marker(new
OpenLayers.LonLat((newPoint.x + 400), (newPoint.y - 400)), icon));
               
                map.setCenter(new OpenLayers.LonLat(newPoint.x, newPoint.y), 13)
        }
       
        function zoomToScale(zoom) {
           if (zoom == 8) map.zoomToScale(3385.5001275);
           else if(zoom == 7) map.zoomToScale(6771.000255);
           else if (zoom == 6) map.zoomToScale(13542);
           else if (zoom == 5) map.zoomToScale(27084.001020);
           else if (zoom == 4) map.zoomToScale(54168.001020);
           else if (zoom == 3) map.zoomToScale(108337);
           else if (zoom == 2) map.zoomToScale(3466752.1306573446);
           else if (zoom == 1) map.zoomToScale(13867008.522629378);
           else if (zoom == 0) map.zoomToScale(55468034.09051751);
        }
       
        function setTableSize() {
                var percentage = 100;
                var screenWidth = screen.width;
                var leftPixels = "0px";
                if (screenWidth > 1024) {
                        percentage = Math.round((1024 / screenWidth) * 100) / 100;
                        percentage = percentage * 100;
                        percentage = percentage + 3;
                        leftPixels = Math.round((screenWidth - 1024) / 2) + "px";
                }
                var percentageString = percentage + "%";
                document.getElementById("mainPageDiv").style.width = percentageString;
                document.getElementById("mainPageDiv").style.left = leftPixels;
                if(navigator.appName.indexOf("Microsoft")!=-1) {
                        document.getElementById("mainPageDiv").style.position="absolute";
                }
        }
</script>
</head>
<body onLoad="setTableSize();init()">
<h1 id="title">Linda's Example.  Push Zoom 5.  You see lines.  Push
Zoom 6.  No lines.</h1>
        <div id="mainPageDiv" style="width: 100%; margin: 2em auto 0
auto;top: 0px;"> <!-- header -->
                <div id="headerDiv">
                </div>
                <div id="restOfPage">
                        <table border="0" cellspacing="0" cellpadding="0" align="center"
width="100%">
                                <tr>
                                        <td valign="top">
                                                <table border="0" cellspacing="0" cellpadding="0" align="center"
width="100%">
                                                </table>
                                                <div>
                                                        <table class="leftTreeTable">
                                                                <tr>
                                                                        <td valign="top">
                                                                                <div id="maps">
                                                                                        <div id="mapsHeader" class="leftPanelheader">
                                                                                                <div class="boxTitleText"> My Maps
                                                                                                </div>
                                                                                                <div class="boxIcons"> Delete Selected
                                                                                                </div>
                                                                                        </div>
                                                                                        <div id="treebox_tree" class="upperLeftBox">
                                                                                        </div>
                                                                                        <div id="leftPanelFooter" class="panelFooter">
                                                                                        </div>
                                                                                </div>
                                                                        </td>
                                                                </tr>
                                                        </table>
                                                </div>
                                        </td>
                                        <td>
                                                <div id="map">
                                                </div>
                                                <button onClick="zoomToScale(5);">Zoom 5</button>
                                                <button onClick="zoomToScale(6);">Zoom 6</button>
                                                <button onClick="zoomToScale(7);">Zoom 7</button>
                                                <button onClick="zoomToScale(8);">Zoom 8</button>
                                        </td>
                                </tr>
                        </table>
                </div>
        </div>
</body>
</html>

--
Linda Rawson

Linda Rawson Test Case

Linda's Example. Push Zoom 5. You see lines. Push Zoom 6. No lines.

My Maps
Delete Selected

_______________________________________________
Users mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/users
Eric Lemoine

Re: Cannot upgrade to 2.6 because of vector lines disappearing in IE (Frustrated)

Reply Threaded More More options
Print post
Permalink
On Wed, Jun 4, 2008 at 7:24 PM, Linda Rawson <[hidden email]> wrote:

> I have a problem with upgrading to 2.6.  I need some of the other
> features and I cannot get this to work.  I have tried to find out
> where in the code it has changed but I cannot find it.
>
> ONLY in IE does this not work.
>
> Extract this example.  You will see a green line and an aqua marker on
> the screen.
>
> Push the button that says Zoom 5.
>
> You still have a green line and an aqua marker on the screen.
>
> Push the button that says Zoom 6.
>
> No lines.  Not for Zoom 7 or Zoom 8 either.

With FF2 I see the line after Zoom 6, but its coords seem to have
changed. I don't see line after Zoom 7 and 8. Is this expected?

--
Eric
_______________________________________________
Users mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/users
Linda Rawson

Re: Cannot upgrade to 2.6 because of vector lines disappearing in IE (Frustrated)

Reply Threaded More More options
Print post
Permalink
No.  With 2.5 you see the lines at all zoom levels in both IE and
Firefox.  This must be a problem in Firefox as well.  Maybe that will
help you guys trouble shoot.

Linda

On Sun, Jun 8, 2008 at 2:11 PM, Eric Lemoine <[hidden email]> wrote:

> On Wed, Jun 4, 2008 at 7:24 PM, Linda Rawson <[hidden email]> wrote:
>> I have a problem with upgrading to 2.6.  I need some of the other
>> features and I cannot get this to work.  I have tried to find out
>> where in the code it has changed but I cannot find it.
>>
>> ONLY in IE does this not work.
>>
>> Extract this example.  You will see a green line and an aqua marker on
>> the screen.
>>
>> Push the button that says Zoom 5.
>>
>> You still have a green line and an aqua marker on the screen.
>>
>> Push the button that says Zoom 6.
>>
>> No lines.  Not for Zoom 7 or Zoom 8 either.
>
> With FF2 I see the line after Zoom 6, but its coords seem to have
> changed. I don't see line after Zoom 7 and 8. Is this expected?
>
> --
> Eric
>



--
Linda Rawson
_______________________________________________
Users mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/users
Linda Rawson

Re: Cannot upgrade to 2.6 because of vector lines disappearing in IE (Frustrated)

Reply Threaded More More options
Print post
Permalink
Any 2.6 vector author's out there?  I still have this issue.
 
Thanks,
Linda

On Sun, Jun 8, 2008 at 3:07 PM, Linda Rawson <[hidden email]> wrote:
No.  With 2.5 you see the lines at all zoom levels in both IE and
Firefox.  This must be a problem in Firefox as well.  Maybe that will
help you guys trouble shoot.

Linda

On Sun, Jun 8, 2008 at 2:11 PM, Eric Lemoine <[hidden email]> wrote:
> On Wed, Jun 4, 2008 at 7:24 PM, Linda Rawson <[hidden email]> wrote:
>> I have a problem with upgrading to 2.6.  I need some of the other
>> features and I cannot get this to work.  I have tried to find out
>> where in the code it has changed but I cannot find it.
>>
>> ONLY in IE does this not work.
>>
>> Extract this example.  You will see a green line and an aqua marker on
>> the screen.
>>
>> Push the button that says Zoom 5.
>>
>> You still have a green line and an aqua marker on the screen.
>>
>> Push the button that says Zoom 6.
>>
>> No lines.  Not for Zoom 7 or Zoom 8 either.
>
> With FF2 I see the line after Zoom 6, but its coords seem to have
> changed. I don't see line after Zoom 7 and 8. Is this expected?
>
> --
> Eric
>



--
Linda Rawson



--
Linda Rawson
_______________________________________________
Users mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/users
Andreas Hocevar

Re: Cannot upgrade to 2.6 because of vector lines disappearing in IE (Frustrated)

Reply Threaded More More options
Print post
Permalink
Linda,

it would be easier to help you if you provide a more stripped down
example that reproduces your problem.

Regards,
Andreas.

On Mon, Jun 16, 2008 at 6:13 AM, Linda Rawson <[hidden email]> wrote:

> Any 2.6 vector author's out there?  I still have this issue.
>
> Thanks,
> Linda
>
> On Sun, Jun 8, 2008 at 3:07 PM, Linda Rawson <[hidden email]> wrote:
>>
>> No.  With 2.5 you see the lines at all zoom levels in both IE and
>> Firefox.  This must be a problem in Firefox as well.  Maybe that will
>> help you guys trouble shoot.
>>
>> Linda
>>
>> On Sun, Jun 8, 2008 at 2:11 PM, Eric Lemoine <[hidden email]> wrote:
>> > On Wed, Jun 4, 2008 at 7:24 PM, Linda Rawson <[hidden email]>
>> > wrote:
>> >> I have a problem with upgrading to 2.6.  I need some of the other
>> >> features and I cannot get this to work.  I have tried to find out
>> >> where in the code it has changed but I cannot find it.
>> >>
>> >> ONLY in IE does this not work.
>> >>
>> >> Extract this example.  You will see a green line and an aqua marker on
>> >> the screen.
>> >>
>> >> Push the button that says Zoom 5.
>> >>
>> >> You still have a green line and an aqua marker on the screen.
>> >>
>> >> Push the button that says Zoom 6.
>> >>
>> >> No lines.  Not for Zoom 7 or Zoom 8 either.
>> >
>> > With FF2 I see the line after Zoom 6, but its coords seem to have
>> > changed. I don't see line after Zoom 7 and 8. Is this expected?
>> >
>> > --
>> > Eric
>> >
>>
>>
>>
>> --
>> Linda Rawson
>
>
>
> --
> Linda Rawson
> _______________________________________________
> Users mailing list
> [hidden email]
> http://openlayers.org/mailman/listinfo/users
>
>
_______________________________________________
Users mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/users
Linda Rawson

Re: Cannot upgrade to 2.6 because of vector lines disappearing in IE (Frustrated)

Reply Threaded More More options
Print post
Permalink
Absolutely.  Anything to help me here!  I so want to go the new
version.  In this example, if I remove the first line I add then all
of the zoom buttons work perfectly.  The line appears at all zoom
levels.  The minute I add more than one line the problem occurs.  I
had all the style sheet stuff in the first example because I noticed
you changed from relative positioning to absolute so I thought maybe
that was causing the problem but that is not the case.  It looks
complex but all I am doing is adding 2 lines and a marker to a
spherical mercator projection map.  This works in 2.5 just not in 2.6.

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Linda Rawson Test Case</title><link
href="http://www.openlayers.org/api/theme/default/style.css"
rel="stylesheet" type="text/css">
<style>
        #map {
              width: 720px;
              height: 720px;
              border: 1px solid #4B3624;
              background: White;
        }
        .olControlAttribution { bottom: 0px!important }
</style>
<script src="http://www.openlayers.org/api/OpenLayers.js"
type="text/javascript"></script>
<script src='http://maps.google.com/maps?file=api&v=2&key=ABQIAAAAjpkAC9ePGem0lIq5XcMiuhR_wWLPFku8Ix9i2SXYRVK3e45q1BQUd_beF8dtzKET_EteAjPdGDwqpQ'></script>
<script type="text/javascript">var map;

      // avoid pink tiles
      OpenLayers.IMAGE_RELOAD_ATTEMPTS = 3;
      OpenLayers.Util.onImageLoadErrorColor = "transparent";

       var vectorLayer;
       var markerLayer, boxes, newPoint;

       function init(){
               var options = {
                   projection: new OpenLayers.Projection("EPSG:900913"),
                   //displayProjection: new OpenLayers.Projection("EPSG:4326"),
                   units: "m",
                       numZoomLevels: 19,
                   maxResolution: 156543.0339,
                   maxExtent: new OpenLayers.Bounds(-20037508, -20037508,
                                                    20037508, 20037508.34)
               };
               map = new OpenLayers.Map('map', options);

               // create Google Mercator layers
               var gmap = new OpenLayers.Layer.Google(
                   "Google Streets",
                   {'sphericalMercator': true}
               );
               map.addLayer(gmap);

               map.addControl(new OpenLayers.Control.PanZoomBar());
               map.addControl(new OpenLayers.Control.MousePosition());

               vectorLayer = new OpenLayers.Layer.Vector("Trails");
               markerLayer = new OpenLayers.Layer.Markers("WayPoints");

               map.addLayers([vectorLayer,markerLayer]);

               var style_trail = OpenLayers.Util.extend({},
OpenLayers.Feature.Vector.style['default']);
               style_trail.strokeColor = "green";
               style_trail.strokeWidth = 5;

               var pointList = [];
                       
               newPoint = new
OpenLayers.Geometry.Point(-13653735.8487833,5726045.3578081);
               pointList.push(newPoint);
               newPoint = new
OpenLayers.Geometry.Point(-13653731.3960036,5726056.5070679);
               pointList.push(newPoint);
               newPoint = new
OpenLayers.Geometry.Point(-13653730.8394062,5726044.7207079);
               pointList.push(newPoint);
               newPoint = new
OpenLayers.Geometry.Point(-13653743.1958697,5726043.9243328);
               pointList.push(newPoint);
               newPoint = new
OpenLayers.Geometry.Point(-13653754.1051798,5726046.9505586);
               pointList.push(newPoint);
               newPoint = new
OpenLayers.Geometry.Point(-13653760.4503907,5726056.5070679);
               pointList.push(newPoint);
               newPoint = new
OpenLayers.Geometry.Point(-13653767.4635187,5726065.5857612);
               pointList.push(newPoint);
               newPoint = new
OpenLayers.Geometry.Point(-13653830.136392,5726052.2066375);
               pointList.push(newPoint);
               newPoint = new
OpenLayers.Geometry.Point(-13653846.5003571,5726042.3315828);
               pointList.push(newPoint);

               var lineFeature = new OpenLayers.Feature.Vector(
                       new OpenLayers.Geometry.LineString(pointList));
               lineFeature.fid = 52730;
               vectorLayer.addFeatures(lineFeature);
                       
               newPoint = new
OpenLayers.Geometry.Point(-12250153.3626406,4852001.6114048);
               pointList.push(newPoint);
               newPoint = new
OpenLayers.Geometry.Point(-12194315.5060664,4800503.5113048);
               pointList.push(newPoint);
               newPoint = new
OpenLayers.Geometry.Point(-12180445.0975155,4873109.008858);
               pointList.push(newPoint);
                       
               lineFeature = new OpenLayers.Feature.Vector(
                            new
OpenLayers.Geometry.LineString(pointList),null,style_trail);
               lineFeature.fid = 52751;
               vectorLayer.addFeatures([lineFeature]);

               var size = new OpenLayers.Size(15, 15);
               var offset = new OpenLayers.Pixel(-(size.w/2), -size.h);
               var icon = new
OpenLayers.Icon('http://boston.openguides.org/markers/AQUA.png', size,
offset);
               markerLayer.addMarker(new OpenLayers.Marker(new
OpenLayers.LonLat((newPoint.x + 400), (newPoint.y - 400)), icon));

               map.setCenter(new OpenLayers.LonLat(newPoint.x, newPoint.y), 13)
       }

       function zoomToScale(zoom) {
          if (zoom == 8) map.zoomToScale(3385.5001275);
          else if(zoom == 7) map.zoomToScale(6771.000255);
          else if (zoom == 6) map.zoomToScale(13542);
          else if (zoom == 5) map.zoomToScale(27084.001020);
          else if (zoom == 4) map.zoomToScale(54168.001020);
          else if (zoom == 3) map.zoomToScale(108337);
          else if (zoom == 2) map.zoomToScale(3466752.1306573446);
          else if (zoom == 1) map.zoomToScale(13867008.522629378);
          else if (zoom == 0) map.zoomToScale(55468034.09051751);
       }

</script>
</head>
<body onLoad="init()">
<h1 id="title">Linda's Example.  Push Zoom 5.  You see lines.  Push
Zoom 6.  No lines.</h1>
     <div id="map">
     </div>
     <button onClick="zoomToScale(5);">Zoom 5</button>
     <button onClick="zoomToScale(6);">Zoom 6</button>
     <button onClick="zoomToScale(7);">Zoom 7</button>
     <button onClick="zoomToScale(8);">Zoom 8</button>
</body>
</html>



On Wed, Jun 18, 2008 at 1:47 AM, Andreas Hocevar
<[hidden email]> wrote:

>
> Linda,
>
> it would be easier to help you if you provide a more stripped down
> example that reproduces your problem.
>
> Regards,
> Andreas.
>
> On Mon, Jun 16, 2008 at 6:13 AM, Linda Rawson <[hidden email]> wrote:
> > Any 2.6 vector author's out there?  I still have this issue.
> >
> > Thanks,
> > Linda
> >
> > On Sun, Jun 8, 2008 at 3:07 PM, Linda Rawson <[hidden email]> wrote:
> >>
> >> No.  With 2.5 you see the lines at all zoom levels in both IE and
> >> Firefox.  This must be a problem in Firefox as well.  Maybe that will
> >> help you guys trouble shoot.
> >>
> >> Linda
> >>
> >> On Sun, Jun 8, 2008 at 2:11 PM, Eric Lemoine <[hidden email]> wrote:
> >> > On Wed, Jun 4, 2008 at 7:24 PM, Linda Rawson <[hidden email]>
> >> > wrote:
> >> >> I have a problem with upgrading to 2.6.  I need some of the other
> >> >> features and I cannot get this to work.  I have tried to find out
> >> >> where in the code it has changed but I cannot find it.
> >> >>
> >> >> ONLY in IE does this not work.
> >> >>
> >> >> Extract this example.  You will see a green line and an aqua marker on
> >> >> the screen.
> >> >>
> >> >> Push the button that says Zoom 5.
> >> >>
> >> >> You still have a green line and an aqua marker on the screen.
> >> >>
> >> >> Push the button that says Zoom 6.
> >> >>
> >> >> No lines.  Not for Zoom 7 or Zoom 8 either.
> >> >
> >> > With FF2 I see the line after Zoom 6, but its coords seem to have
> >> > changed. I don't see line after Zoom 7 and 8. Is this expected?
> >> >
> >> > --
> >> > Eric
> >> >
> >>
> >>
> >>
> >> --
> >> Linda Rawson
> >
> >
> >
> > --
> > Linda Rawson
> > _______________________________________________
> > Users mailing list
> > [hidden email]
> > http://openlayers.org/mailman/listinfo/users
> >
> >



--
Linda Rawson
_______________________________________________
Users mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/users
Linda Rawson

Re: Cannot upgrade to 2.6 because of vector lines disappearing in IE (Frustrated)

Reply Threaded More More options
Print post
Permalink
I forgot a line in the example.  I forgot to set the pointlist to a
new array.  Please add this line:

pointList = [];

Right before this line:

newPoint = new OpenLayers.Geometry.Point(-12250153.3626406,4852001.6114048);

Thanks so much for looking at this!
Linda

On Wed, Jun 18, 2008 at 8:48 AM, Linda Rawson <[hidden email]> wrote:

> Absolutely.  Anything to help me here!  I so want to go the new
> version.  In this example, if I remove the first line I add then all
> of the zoom buttons work perfectly.  The line appears at all zoom
> levels.  The minute I add more than one line the problem occurs.  I
> had all the style sheet stuff in the first example because I noticed
> you changed from relative positioning to absolute so I thought maybe
> that was causing the problem but that is not the case.  It looks
> complex but all I am doing is adding 2 lines and a marker to a
> spherical mercator projection map.  This works in 2.5 just not in 2.6.
>
> <html xmlns="http://www.w3.org/1999/xhtml">
> <head>
> <title>Linda Rawson Test Case</title><link
> href="http://www.openlayers.org/api/theme/default/style.css"
> rel="stylesheet" type="text/css">
> <style>
>        #map {
>              width: 720px;
>              height: 720px;
>              border: 1px solid #4B3624;
>              background: White;
>        }
>        .olControlAttribution { bottom: 0px!important }
> </style>
> <script src="http://www.openlayers.org/api/OpenLayers.js"
> type="text/javascript"></script>
> <script src='http://maps.google.com/maps?file=api&v=2&key=ABQIAAAAjpkAC9ePGem0lIq5XcMiuhR_wWLPFku8Ix9i2SXYRVK3e45q1BQUd_beF8dtzKET_EteAjPdGDwqpQ'></script>
> <script type="text/javascript">var map;
>
>      // avoid pink tiles
>      OpenLayers.IMAGE_RELOAD_ATTEMPTS = 3;
>      OpenLayers.Util.onImageLoadErrorColor = "transparent";
>
>       var vectorLayer;
>       var markerLayer, boxes, newPoint;
>
>       function init(){
>               var options = {
>                   projection: new OpenLayers.Projection("EPSG:900913"),
>                   //displayProjection: new OpenLayers.Projection("EPSG:4326"),
>                   units: "m",
>                       numZoomLevels: 19,
>                   maxResolution: 156543.0339,
>                   maxExtent: new OpenLayers.Bounds(-20037508, -20037508,
>                                                    20037508, 20037508.34)
>               };
>               map = new OpenLayers.Map('map', options);
>
>               // create Google Mercator layers
>               var gmap = new OpenLayers.Layer.Google(
>                   "Google Streets",
>                   {'sphericalMercator': true}
>               );
>               map.addLayer(gmap);
>
>               map.addControl(new OpenLayers.Control.PanZoomBar());
>               map.addControl(new OpenLayers.Control.MousePosition());
>
>               vectorLayer = new OpenLayers.Layer.Vector("Trails");
>               markerLayer = new OpenLayers.Layer.Markers("WayPoints");
>
>               map.addLayers([vectorLayer,markerLayer]);
>
>               var style_trail = OpenLayers.Util.extend({},
> OpenLayers.Feature.Vector.style['default']);
>               style_trail.strokeColor = "green";
>               style_trail.strokeWidth = 5;
>
>               var pointList = [];
>
>               newPoint = new
> OpenLayers.Geometry.Point(-13653735.8487833,5726045.3578081);
>               pointList.push(newPoint);
>               newPoint = new
> OpenLayers.Geometry.Point(-13653731.3960036,5726056.5070679);
>               pointList.push(newPoint);
>               newPoint = new
> OpenLayers.Geometry.Point(-13653730.8394062,5726044.7207079);
>               pointList.push(newPoint);
>               newPoint = new
> OpenLayers.Geometry.Point(-13653743.1958697,5726043.9243328);
>               pointList.push(newPoint);
>               newPoint = new
> OpenLayers.Geometry.Point(-13653754.1051798,5726046.9505586);
>               pointList.push(newPoint);
>               newPoint = new
> OpenLayers.Geometry.Point(-13653760.4503907,5726056.5070679);
>               pointList.push(newPoint);
>               newPoint = new
> OpenLayers.Geometry.Point(-13653767.4635187,5726065.5857612);
>               pointList.push(newPoint);
>               newPoint = new
> OpenLayers.Geometry.Point(-13653830.136392,5726052.2066375);
>               pointList.push(newPoint);
>               newPoint = new
> OpenLayers.Geometry.Point(-13653846.5003571,5726042.3315828);
>               pointList.push(newPoint);
>
>               var lineFeature = new OpenLayers.Feature.Vector(
>                       new OpenLayers.Geometry.LineString(pointList));
>               lineFeature.fid = 52730;
>               vectorLayer.addFeatures(lineFeature);
>
>               newPoint = new
> OpenLayers.Geometry.Point(-12250153.3626406,4852001.6114048);
>               pointList.push(newPoint);
>               newPoint = new
> OpenLayers.Geometry.Point(-12194315.5060664,4800503.5113048);
>               pointList.push(newPoint);
>               newPoint = new
> OpenLayers.Geometry.Point(-12180445.0975155,4873109.008858);
>               pointList.push(newPoint);
>
>               lineFeature = new OpenLayers.Feature.Vector(
>                            new
> OpenLayers.Geometry.LineString(pointList),null,style_trail);
>               lineFeature.fid = 52751;
>               vectorLayer.addFeatures([lineFeature]);
>
>               var size = new OpenLayers.Size(15, 15);
>               var offset = new OpenLayers.Pixel(-(size.w/2), -size.h);
>               var icon = new
> OpenLayers.Icon('http://boston.openguides.org/markers/AQUA.png', size,
> offset);
>               markerLayer.addMarker(new OpenLayers.Marker(new
> OpenLayers.LonLat((newPoint.x + 400), (newPoint.y - 400)), icon));
>
>               map.setCenter(new OpenLayers.LonLat(newPoint.x, newPoint.y), 13)
>       }
>
>       function zoomToScale(zoom) {
>          if (zoom == 8) map.zoomToScale(3385.5001275);
>          else if(zoom == 7) map.zoomToScale(6771.000255);
>          else if (zoom == 6) map.zoomToScale(13542);
>          else if (zoom == 5) map.zoomToScale(27084.001020);
>          else if (zoom == 4) map.zoomToScale(54168.001020);
>          else if (zoom == 3) map.zoomToScale(108337);
>          else if (zoom == 2) map.zoomToScale(3466752.1306573446);
>          else if (zoom == 1) map.zoomToScale(13867008.522629378);
>          else if (zoom == 0) map.zoomToScale(55468034.09051751);
>       }
>
> </script>
> </head>
> <body onLoad="init()">
> <h1 id="title">Linda's Example.  Push Zoom 5.  You see lines.  Push
> Zoom 6.  No lines.</h1>
>     <div id="map">
>     </div>
>     <button onClick="zoomToScale(5);">Zoom 5</button>
>     <button onClick="zoomToScale(6);">Zoom 6</button>
>     <button onClick="zoomToScale(7);">Zoom 7</button>
>     <button onClick="zoomToScale(8);">Zoom 8</button>
> </body>
> </html>
>
>
>
> On Wed, Jun 18, 2008 at 1:47 AM, Andreas Hocevar
> <[hidden email]> wrote:
>>
>> Linda,
>>
>> it would be easier to help you if you provide a more stripped down
>> example that reproduces your problem.
>>
>> Regards,
>> Andreas.
>>
>> On Mon, Jun 16, 2008 at 6:13 AM, Linda Rawson <[hidden email]> wrote:
>> > Any 2.6 vector author's out there?  I still have this issue.
>> >
>> > Thanks,
>> > Linda
>> >
>> > On Sun, Jun 8, 2008 at 3:07 PM, Linda Rawson <[hidden email]> wrote:
>> >>
>> >> No.  With 2.5 you see the lines at all zoom levels in both IE and
>> >> Firefox.  This must be a problem in Firefox as well.  Maybe that will
>> >> help you guys trouble shoot.
>> >>
>> >> Linda
>> >>
>> >> On Sun, Jun 8, 2008 at 2:11 PM, Eric Lemoine <[hidden email]> wrote:
>> >> > On Wed, Jun 4, 2008 at 7:24 PM, Linda Rawson <[hidden email]>
>> >> > wrote:
>> >> >> I have a problem with upgrading to 2.6.  I need some of the other
>> >> >> features and I cannot get this to work.  I have tried to find out
>> >> >> where in the code it has changed but I cannot find it.
>> >> >>
>> >> >> ONLY in IE does this not work.
>> >> >>
>> >> >> Extract this example.  You will see a green line and an aqua marker on
>> >> >> the screen.
>> >> >>
>> >> >> Push the button that says Zoom 5.
>> >> >>
>> >> >> You still have a green line and an aqua marker on the screen.
>> >> >>
>> >> >> Push the button that says Zoom 6.
>> >> >>
>> >> >> No lines.  Not for Zoom 7 or Zoom 8 either.
>> >> >
>> >> > With FF2 I see the line after Zoom 6, but its coords seem to have
>> >> > changed. I don't see line after Zoom 7 and 8. Is this expected?
>> >> >
>> >> > --
>> >> > Eric
>> >> >
>> >>
>> >>
>> >>
>> >> --
>> >> Linda Rawson
>> >
>> >
>> >
>> > --
>> > Linda Rawson
>> > _______________________________________________
>> > Users mailing list
>> > [hidden email]
>> > http://openlayers.org/mailman/listinfo/users
>> >
>> >
>
>
>
> --
> Linda Rawson
>



--
Linda Rawson
_______________________________________________
Users mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/users
Eric Lemoine

Re: Cannot upgrade to 2.6 because of vector lines disappearing in IE (Frustrated)

Reply Threaded More More options
Print post
Permalink
Hi,

On FF2 the line disappears on zoom #16. The line disappears in
drawLineString() (SVG.js) when calling setAttributeNS(). I couldn't
get any further.

--
Eric
_______________________________________________
Users mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/users
Eric Lemoine

Re: Cannot upgrade to 2.6 because of vector lines disappearing in IE (Frustrated)

Reply Threaded More More options
Print post
Permalink
On Wed, Jun 18, 2008 at 10:48 PM, Eric Lemoine <[hidden email]> wrote:
> Hi,
>
> On FF2 the line disappears on zoom #16. The line disappears in
> drawLineString() (SVG.js) when calling setAttributeNS(). I couldn't
> get any further.

The problem comes from the fact SVG.inValidRange() returns false. Hope
that can help you debug this Andreas.

--
Eric
_______________________________________________
Users mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/users
Andreas Hocevar

Re: Cannot upgrade to 2.6 because of vector lines disappearing in IE (Frustrated)

Reply Threaded More More options
Print post
Permalink
Some javascript/style in this post has been disabled (why?)
Ok, I did some investigation.

The reason why this testcase fails is that the two features are far
away from each other. So the SVG renderer will find that the
coordinates are not in valid range (because too large), and the VML
renderer fails for reasons not clear to me.

Two separate workarounds are needed, one for IE and one for FF. In IE,
we have to modify renderer.drawFeature to only draw features that
intersect the map extent. The FF workaround is to just return always
true in renderer.inValidRange. Be warned that the FF workaround will
likely cause FF2 to crash, but as I hear from Linda, her users do not
use FF anyway.

Ok, attached is a working version of the test case. The relevant code
snippet (to be put in the init function, after instantiation of the
vector layer) is:

vectorLayer.renderer.inValidRange = function() {
    return true;
};
vectorLayer.renderer.drawFeature = function(feature, style) {
    if(!feature.geometry.intersects(feature.layer.map.getExtent().toGeometry()))
{
        return;
    }
    OpenLayers.Renderer.prototype.drawFeature.apply(this, arguments);
};


We might consider to add the second workaround to trunk, because it
will reduce the number of features to be rendered. On the other hand,
the intersects check is quite expensive.

Linda, please let us know if this fix works for you.

Regards,
Andreas.

On Wed, Jun 18, 2008 at 10:59 PM, Eric Lemoine <[hidden email]> wrote:

> On Wed, Jun 18, 2008 at 10:48 PM, Eric Lemoine <[hidden email]> wrote:
>> Hi,
>>
>> On FF2 the line disappears on zoom #16. The line disappears in
>> drawLineString() (SVG.js) when calling setAttributeNS(). I couldn't
>> get any further.
>
> The problem comes from the fact SVG.inValidRange() returns false. Hope
> that can help you debug this Andreas.
>
> --
> Eric
>

Linda Rawson Test Case

Linda's Example. Push Zoom 5. You see lines. Push Zoom 6. No lines.


_______________________________________________
Users mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/users
Christopher Schmidt-2

Re: Cannot upgrade to 2.6 because of vector lines disappearing in IE (Frustrated)

Reply Threaded More More options
Print post
Permalink
On Thu, Jun 26, 2008 at 07:54:23PM +0200, Andreas Hocevar wrote:

> Ok, I did some investigation.
>
> The reason why this testcase fails is that the two features are far
> away from each other. So the SVG renderer will find that the
> coordinates are not in valid range (because too large), and the VML
> renderer fails for reasons not clear to me.
>
> Two separate workarounds are needed, one for IE and one for FF. In IE,
> we have to modify renderer.drawFeature to only draw features that
> intersect the map extent. The FF workaround is to just return always
> true in renderer.inValidRange. Be warned that the FF workaround will
> likely cause FF2 to crash, but as I hear from Linda, her users do not
> use FF anyway.
>
> Ok, attached is a working version of the test case. The relevant code
> snippet (to be put in the init function, after instantiation of the
> vector layer) is:
>
> vectorLayer.renderer.inValidRange = function() {
>     return true;
> };
> vectorLayer.renderer.drawFeature = function(feature, style) {
>     if(!feature.geometry.intersects(feature.layer.map.getExtent().toGeometry()))
> {
>         return;
>     }
>     OpenLayers.Renderer.prototype.drawFeature.apply(this, arguments);
> };
>
>
> We might consider to add the second workaround to trunk, because it
> will reduce the number of features to be rendered. On the other hand,
> the intersects check is quite expensive.

If we were going to do this, I'd say we should instead use
geometry.getBounds() and map.getBounds() and check intersectsBounds() on
them, rather than using the (more expensive) geometry.intersects(),
since mostly what we care about here is bbox intersection.

Regards,
--
Christopher Schmidt
MetaCarta
_______________________________________________
Users mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/users
Andreas Hocevar

Re: Cannot upgrade to 2.6 because of vector lines disappearing in IE (Frustrated)

Reply Threaded More More options
Print post
Permalink
On Thu, Jun 26, 2008 at 8:05 PM, Christopher Schmidt
<[hidden email]> wrote:
> On Thu, Jun 26, 2008 at 07:54:23PM +0200, Andreas Hocevar wrote:
>> We might consider to add the second workaround to trunk, because it
>> will reduce the number of features to be rendered. On the other hand,
>> the intersects check is quite expensive.
>
> If we were going to do this, I'd say we should instead use
> geometry.getBounds() and map.getBounds() and check intersectsBounds() on
> them, rather than using the (more expensive) geometry.intersects(),
> since mostly what we care about here is bbox intersection.


Absolutely right. So the less expensive second workaround would look like this:

vectorLayer.renderer.drawFeature = function(feature, style) {

    if(feature.geometry.getBounds().intersectsBounds(
            feature.layer.map.getExtent())) {

        OpenLayers.Renderer.prototype.drawFeature.apply(this, arguments);

    }

};


Chris, should I create a ticket? We might want to do some profiling
before moving this to trunk though.

Regards,
Andreas.
_______________________________________________
Users mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/users
Andreas Hocevar

Re: Cannot upgrade to 2.6 because of vector lines disappearing in IE (Frustrated)

Reply Threaded More More options
Print post
Permalink
Linda,

On Wed, Jul 2, 2008 at 1:40 AM, Linda Rawson <[hidden email]> wrote:

> I so wish this had taken care of the problems.  But I am still having problems.
>
> The example looks complex but in actuality it is simply 8 linestring
> features on a vector layer.
>
> When the example starts you see line 1.  You can zoom5, zoom6, zoom7,
> zoom8 all day.  Works great.
>
> Then I push the button called Line 1.  It should zoom to where line 1
> is.  It does.  But the line does not show until I push zoom5 button
> which simply does a zoomtoscale.  The same with all the other lines.
> Something about setcenter is not making the lines appear.

Please try if the patch from http://trac.openlayers.org/ticket/1602
solves your problem.

Regards,
Andreas.
_______________________________________________
Users mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/users
Linda Rawson

Re: Cannot upgrade to 2.6 because of vector lines disappearing in IE (Frustrated)

Reply Threaded More More options
Print post
Permalink
Yes it does!  Thanks!

On Wed, Jul 2, 2008 at 1:32 AM, Andreas Hocevar
<[hidden email]> wrote:

> Linda,
>
> On Wed, Jul 2, 2008 at 1:40 AM, Linda Rawson <[hidden email]> wrote:
>> I so wish this had taken care of the problems.  But I am still having problems.
>>
>> The example looks complex but in actuality it is simply 8 linestring
>> features on a vector layer.
>>
>> When the example starts you see line 1.  You can zoom5, zoom6, zoom7,
>> zoom8 all day.  Works great.
>>
>> Then I push the button called Line 1.  It should zoom to where line 1
>> is.  It does.  But the line does not show until I push zoom5 button
>> which simply does a zoomtoscale.  The same with all the other lines.
>> Something about setcenter is not making the lines appear.
>
> Please try if the patch from http://trac.openlayers.org/ticket/1602
> solves your problem.
>
> Regards,
> Andreas.
>



--
Linda Rawson
_______________________________________________
Users mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/users