sagulnet / winforms-geplugin-control-library

Automatically exported from code.google.com/p/winforms-geplugin-control-library
GNU General Public License v3.0
0 stars 0 forks source link

somewhere between rev 415 and rev 425 the Server/GEServer class broke #60

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Use GEServer.
2. Create a placemark with an image in that server e.g. 
http://localhost:8080/reddot.png

What is the expected output? What do you see instead?
- The image is not displayed.

What version of the product are you using? On what operating system?
rev 425 on windows 7

Please provide any additional information below.
I tested the "Server.cs" class from rev. 415 and it works fine. The image 
displays as expected...
I did not change anything but to include Server.cs into rev 425 and use this 
class instead of GEServer.cs.

I'd consider this bug critical.

Original issue reported on code.google.com by xma...@googlemail.com on 9 Nov 2011 at 7:19

GoogleCodeExporter commented 8 years ago
Hi, will take a look at this asap. OOI if you set the DEBUG constant do you get 
any error from the server? 404 etc?

Original comment by fraser.c...@gmail.com on 14 Nov 2011 at 12:09

GoogleCodeExporter commented 8 years ago
I debugged it a bit further. Interestingly not ALL files are not served 
correctly.

When I include the sample kml file with the new version it works.
I get the Debug message:
Server-Request: GET /KML_Samples.kml HTTP/1.1

But when the browser tries to get the pictures nothing appears in the debug 
logs.
And I'm sure not to have changed anything than the server classes.

Original comment by xma...@googlemail.com on 18 Nov 2011 at 10:28

GoogleCodeExporter commented 8 years ago
I can't reproduce this, I tested using this kml:

<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2">
  <Document>
    <name>Highlighted Icon</name>
    <description>Place your mouse over the icon to see it display the new icon</description>
    <Style id="highlightPlacemark">
      <IconStyle>
        <Icon>
          <href>red-stars.png</href>
        </Icon>
      </IconStyle>
    </Style>
    <Style id="normalPlacemark">
      <IconStyle>
        <Icon>
          <href>wht-blank.png</href>
        </Icon>
      </IconStyle>
    </Style>
    <StyleMap id="exampleStyleMap">
      <Pair>
        <key>normal</key>
        <styleUrl>#normalPlacemark</styleUrl>
      </Pair>
      <Pair>
        <key>highlight</key>
        <styleUrl>#highlightPlacemark</styleUrl>
      </Pair>
    </StyleMap>
    <Placemark>
      <name>Roll over this icon</name>
      <styleUrl>#exampleStyleMap</styleUrl>
      <Point>
        <coordinates>-122.0856545755255,37.42243077405461,0</coordinates>
      </Point>
    </Placemark>
  </Document>
</kml>

The folder structure (from the project root) was as follows:

webroot
|- highlightPlacemark.kml
|- red-stars.png
|- wht-blank.png

The code to load it was like so.

public partial class Form1 : Form
    {
        private GEServer server = null;

        public Form1()
        {
            InitializeComponent();

            server = new GEServer("webroot");
            server.Start();

            geWebBrowser1.PluginReady += new EventHandler<GEEventArgs>(geWebBrowser1_PluginReady);
            geWebBrowser1.KmlLoaded += new EventHandler<GEEventArgs>(geWebBrowser1_KmlLoaded);
            geWebBrowser1.LoadEmbeddedPlugin();
        }

        private void geWebBrowser1_KmlLoaded(object sender, GEEventArgs e)
        {
            if (e.ApiObject != null)
            {
                geWebBrowser1.ParseKmlObject(e.ApiObject);
            }
        }

        private void geWebBrowser1_PluginReady(object sender, GEEventArgs e)
        {
            geWebBrowser1.FetchKml(server.BaseUrl + "highlightPlacemark.kml");
        }

        void geWebBrowser1_KmlEvent(object sender, GEEventArgs e)
        {
            MessageBox.Show(e.Data, e.Message);
        }

    }
}

Here the placemarks icons show the local files and the rollover works as 
expected. Could you post an example of your case? 

Thanks.

Original comment by fraser.c...@gmail.com on 3 Dec 2011 at 12:30

GoogleCodeExporter commented 8 years ago
Ah ok, I have can reproduce this intermittently - the problem is the 
"Connection: close" - sent from GEServer.SendHeader. 

Oddly it works most of the time, but occasionally the close stops the 
referenced images loading...

will fix asap - the header was included as I was testing and I stupidly left it 
in...

Original comment by fraser.c...@gmail.com on 4 Dec 2011 at 4:29

GoogleCodeExporter commented 8 years ago
Thank You!

Original comment by xma...@googlemail.com on 4 Dec 2011 at 4:54

GoogleCodeExporter commented 8 years ago
Fixed in revision 431
http://code.google.com/p/winforms-geplugin-control-library/source/detail?spec=sv
n431&r=431

Original comment by fraser.c...@gmail.com on 12 Dec 2011 at 8:50

GoogleCodeExporter commented 8 years ago

Original comment by fraser.c...@gmail.com on 13 Dec 2011 at 5:19