KML layer vector empty

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

KML layer vector empty

Jsantos
Hi all,

I am creating vector layers in format KML. I have the sources in drop box to avoid CORS, but when I load them in the map they have no features. Any ideas about this issue will be very much appreciated.

Thank you

JJ.

Please see below how I am doing it.

var layers = [
 
        wms_bmid_pipes = new ol.layer.Vector({
                                source: new ol.source.Vector({
                                url: 'https://dl.dropboxusercontent.com/s/ea4qzzuyk5i2mxt /geid_ws-bmid-pipes.kml?dl=0',
                                format: new ol.format.KML()
                                })
                        })
            ];
               

Since the layer does not show up in the map I ran the code below to check how many features it has (this code comes from the open layers web site). It turns out that in the console I get "Count after change: 0" , meaning that there are no features.
       
                wms_bmid_pipes.getSource().on('change', function(evt){
                        var source = evt.target;
                                if (source.getState() === 'ready') {
                                        var numFeatures = source.getFeatures().length;
                                        console.log("Count after change: " + numFeatures);
                                }
                });


The point is that the wms_bmid_pipes  contains this:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<kml xmlns="http://www.opengis.net/kml/2.2" xmlns:ns2="http://www.google.com/kml/ext/2.2" xmlns:ns3="http://www.w3.org/2005/Atom" xmlns:ns4="urn:oasis:names:tc:ciq:xsdschema:xAL:2.0">
    <Document>
        <LookAt>
            <longitude>-119.3597596329119</longitude>
            <latitude>49.89850519575446</latitude>
            <altitude>19983.5008834143</altitude>
            <heading>0.0</heading>
            <tilt>0.0</tilt>
            <range>16147.716881798802</range>
            <altitudeMode>clampToGround</altitudeMode>
        </LookAt>
        <NetworkLink>
            <name>bmid-pipes</name>
            <visibility>1</visibility>
            <open>1</open>
            <LookAt>
                <longitude>-119.3597596329119</longitude>
                <latitude>49.89850519575446</latitude>
                <altitude>19983.5008834143</altitude>
                <heading>0.0</heading>
                <tilt>0.0</tilt>
                <range>16147.716881798802</range>
                <altitudeMode>clampToGround</altitudeMode>
            </LookAt>
            <Url>
                <href>http://localhost:8080/geoserver/geid_ws/wms?service=wms&amp;request=GetMap&amp;version=1.1.1&amp;format=application/vnd.google-earth.kml+xml&amp;layers=geid_ws:bmid-pipes&amp;styles=line&amp;height=2048&amp;width=2048&amp;transparent=false&amp;srs=EPSG:4326&amp;format_options=AUTOFIT:true;KMATTR:true;KMPLACEMARK:false;KMSCORE:40;MODE:refresh;SUPEROVERLAY:false</href>
                <refreshInterval>0.0</refreshInterval>
                <viewRefreshMode>onStop</viewRefreshMode>
                <viewRefreshTime>1.0</viewRefreshTime>
                <viewBoundScale>1.0</viewBoundScale>
            </Url>
        </NetworkLink>
    </Document>
</kml>

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

Re: KML layer vector empty

Alexandre Dubé
Hello,

   You should use StackOverflow for questions related to OpenLayers 3:
http://zeus.dev.where2getit.com/brooksbrothers/index_less_poi.html

   Also, a JSFiddle would be a good way to attract people into helping you.

Regards,

Alexandre


On 15-10-16 11:29 AM, Jair Santos wrote:

> Hi all,
>
> I am creating vector layers in format KML. I have the sources in drop box to avoid CORS, but when I load them in the map they have no features. Any ideas about this issue will be very much appreciated.
>
> Thank you
>
> JJ.
>
> Please see below how I am doing it.
>
> var layers = [
>  
> wms_bmid_pipes = new ol.layer.Vector({
> source: new ol.source.Vector({
> url: 'https://dl.dropboxusercontent.com/s/ea4qzzuyk5i2mxt /geid_ws-bmid-pipes.kml?dl=0',
> format: new ol.format.KML()
> })
> })
>              ];
>
>
> Since the layer does not show up in the map I ran the code below to check how many features it has (this code comes from the open layers web site). It turns out that in the console I get "Count after change: 0" , meaning that there are no features.
>
> wms_bmid_pipes.getSource().on('change', function(evt){
> var source = evt.target;
> if (source.getState() === 'ready') {
> var numFeatures = source.getFeatures().length;
> console.log("Count after change: " + numFeatures);
> }
> });
>
>
> The point is that the wms_bmid_pipes  contains this:
>
> <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
> <kml xmlns="http://www.opengis.net/kml/2.2" xmlns:ns2="http://www.google.com/kml/ext/2.2" xmlns:ns3="http://www.w3.org/2005/Atom" xmlns:ns4="urn:oasis:names:tc:ciq:xsdschema:xAL:2.0">
>      <Document>
>          <LookAt>
>              <longitude>-119.3597596329119</longitude>
>              <latitude>49.89850519575446</latitude>
>              <altitude>19983.5008834143</altitude>
>              <heading>0.0</heading>
>              <tilt>0.0</tilt>
>              <range>16147.716881798802</range>
>              <altitudeMode>clampToGround</altitudeMode>
>          </LookAt>
>          <NetworkLink>
>              <name>bmid-pipes</name>
>              <visibility>1</visibility>
>              <open>1</open>
>              <LookAt>
>                  <longitude>-119.3597596329119</longitude>
>                  <latitude>49.89850519575446</latitude>
>                  <altitude>19983.5008834143</altitude>
>                  <heading>0.0</heading>
>                  <tilt>0.0</tilt>
>                  <range>16147.716881798802</range>
>                  <altitudeMode>clampToGround</altitudeMode>
>              </LookAt>
>              <Url>
>                  <href>http://localhost:8080/geoserver/geid_ws/wms?service=wms&amp;request=GetMap&amp;version=1.1.1&amp;format=application/vnd.google-earth.kml+xml&amp;layers=geid_ws:bmid-pipes&amp;styles=line&amp;height=2048&amp;width=2048&amp;transparent=false&amp;srs=EPSG:4326&amp;format_options=AUTOFIT:true;KMATTR:true;KMPLACEMARK:false;KMSCORE:40;MODE:refresh;SUPEROVERLAY:false</href>
>                  <refreshInterval>0.0</refreshInterval>
>                  <viewRefreshMode>onStop</viewRefreshMode>
>                  <viewRefreshTime>1.0</viewRefreshTime>
>                  <viewBoundScale>1.0</viewBoundScale>
>              </Url>
>          </NetworkLink>
>      </Document>
> </kml>
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.osgeo.org/mailman/listinfo/openlayers-users

--
Alexandre Dubé
T: +1 418-696-5056 #203
http://www.mapgears.com/

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

Re: KML layer vector empty

Jsantos
Thank you, but could you please clarify Alexandre.

Is this not an openlayers user list?

Cheers.

JJ.

-----Original Message-----
From: Users [mailto:[hidden email]] On Behalf Of Alexandre Dubé
Sent: Friday, October 16, 2015 8:41 AM
To: [hidden email]
Subject: Re: [OpenLayers-Users] KML layer vector empty

Hello,

   You should use StackOverflow for questions related to OpenLayers 3:
http://zeus.dev.where2getit.com/brooksbrothers/index_less_poi.html

   Also, a JSFiddle would be a good way to attract people into helping you.

Regards,

Alexandre


On 15-10-16 11:29 AM, Jair Santos wrote:

> Hi all,
>
> I am creating vector layers in format KML. I have the sources in drop box to avoid CORS, but when I load them in the map they have no features. Any ideas about this issue will be very much appreciated.
>
> Thank you
>
> JJ.
>
> Please see below how I am doing it.
>
> var layers = [
>  
> wms_bmid_pipes = new ol.layer.Vector({
> source: new ol.source.Vector({
> url: 'https://dl.dropboxusercontent.com/s/ea4qzzuyk5i2mxt /geid_ws-bmid-pipes.kml?dl=0',
> format: new ol.format.KML()
> })
> })
>              ];
>
>
> Since the layer does not show up in the map I ran the code below to check how many features it has (this code comes from the open layers web site). It turns out that in the console I get "Count after change: 0" , meaning that there are no features.
>
> wms_bmid_pipes.getSource().on('change', function(evt){
> var source = evt.target;
> if (source.getState() === 'ready') {
> var numFeatures = source.getFeatures().length;
> console.log("Count after change: " + numFeatures);
> }
> });
>
>
> The point is that the wms_bmid_pipes  contains this:
>
> <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <kml
> xmlns="http://www.opengis.net/kml/2.2" xmlns:ns2="http://www.google.com/kml/ext/2.2" xmlns:ns3="http://www.w3.org/2005/Atom" xmlns:ns4="urn:oasis:names:tc:ciq:xsdschema:xAL:2.0">
>      <Document>
>          <LookAt>
>              <longitude>-119.3597596329119</longitude>
>              <latitude>49.89850519575446</latitude>
>              <altitude>19983.5008834143</altitude>
>              <heading>0.0</heading>
>              <tilt>0.0</tilt>
>              <range>16147.716881798802</range>
>              <altitudeMode>clampToGround</altitudeMode>
>          </LookAt>
>          <NetworkLink>
>              <name>bmid-pipes</name>
>              <visibility>1</visibility>
>              <open>1</open>
>              <LookAt>
>                  <longitude>-119.3597596329119</longitude>
>                  <latitude>49.89850519575446</latitude>
>                  <altitude>19983.5008834143</altitude>
>                  <heading>0.0</heading>
>                  <tilt>0.0</tilt>
>                  <range>16147.716881798802</range>
>                  <altitudeMode>clampToGround</altitudeMode>
>              </LookAt>
>              <Url>
>                  <href>http://localhost:8080/geoserver/geid_ws/wms?service=wms&amp;request=GetMap&amp;version=1.1.1&amp;format=application/vnd.google-earth.kml+xml&amp;layers=geid_ws:bmid-pipes&amp;styles=line&amp;height=2048&amp;width=2048&amp;transparent=false&amp;srs=EPSG:4326&amp;format_options=AUTOFIT:true;KMATTR:true;KMPLACEMARK:false;KMSCORE:40;MODE:refresh;SUPEROVERLAY:false</href>
>                  <refreshInterval>0.0</refreshInterval>
>                  <viewRefreshMode>onStop</viewRefreshMode>
>                  <viewRefreshTime>1.0</viewRefreshTime>
>                  <viewBoundScale>1.0</viewBoundScale>
>              </Url>
>          </NetworkLink>
>      </Document>
> </kml>
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.osgeo.org/mailman/listinfo/openlayers-users

--
Alexandre Dubé
T: +1 418-696-5056 #203
http://www.mapgears.com/

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

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

Re: KML layer vector empty

Alexandre Dubé
Sorry about that.  Here you go:

http://stackoverflow.com/questions/tagged/openlayers-3

Alexandre

On 15-10-16 12:48 PM, Jair Santos wrote:

> Thank you, but could you please clarify Alexandre.
>
> Is this not an openlayers user list?
>
> Cheers.
>
> JJ.
>
> -----Original Message-----
> From: Users [mailto:[hidden email]] On Behalf Of Alexandre Dubé
> Sent: Friday, October 16, 2015 8:41 AM
> To: [hidden email]
> Subject: Re: [OpenLayers-Users] KML layer vector empty
>
> Hello,
>
>     You should use StackOverflow for questions related to OpenLayers 3:
> http://zeus.dev.where2getit.com/brooksbrothers/index_less_poi.html
>
>     Also, a JSFiddle would be a good way to attract people into helping you.
>
> Regards,
>
> Alexandre
>
>
> On 15-10-16 11:29 AM, Jair Santos wrote:
>> Hi all,
>>
>> I am creating vector layers in format KML. I have the sources in drop box to avoid CORS, but when I load them in the map they have no features. Any ideas about this issue will be very much appreciated.
>>
>> Thank you
>>
>> JJ.
>>
>> Please see below how I am doing it.
>>
>> var layers = [
>>    
>> wms_bmid_pipes = new ol.layer.Vector({
>> source: new ol.source.Vector({
>> url: 'https://dl.dropboxusercontent.com/s/ea4qzzuyk5i2mxt /geid_ws-bmid-pipes.kml?dl=0',
>> format: new ol.format.KML()
>> })
>> })
>>               ];
>>
>>
>> Since the layer does not show up in the map I ran the code below to check how many features it has (this code comes from the open layers web site). It turns out that in the console I get "Count after change: 0" , meaning that there are no features.
>>
>> wms_bmid_pipes.getSource().on('change', function(evt){
>> var source = evt.target;
>> if (source.getState() === 'ready') {
>> var numFeatures = source.getFeatures().length;
>> console.log("Count after change: " + numFeatures);
>> }
>> });
>>
>>
>> The point is that the wms_bmid_pipes  contains this:
>>
>> <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <kml
>> xmlns="http://www.opengis.net/kml/2.2" xmlns:ns2="http://www.google.com/kml/ext/2.2" xmlns:ns3="http://www.w3.org/2005/Atom" xmlns:ns4="urn:oasis:names:tc:ciq:xsdschema:xAL:2.0">
>>       <Document>
>>           <LookAt>
>>               <longitude>-119.3597596329119</longitude>
>>               <latitude>49.89850519575446</latitude>
>>               <altitude>19983.5008834143</altitude>
>>               <heading>0.0</heading>
>>               <tilt>0.0</tilt>
>>               <range>16147.716881798802</range>
>>               <altitudeMode>clampToGround</altitudeMode>
>>           </LookAt>
>>           <NetworkLink>
>>               <name>bmid-pipes</name>
>>               <visibility>1</visibility>
>>               <open>1</open>
>>               <LookAt>
>>                   <longitude>-119.3597596329119</longitude>
>>                   <latitude>49.89850519575446</latitude>
>>                   <altitude>19983.5008834143</altitude>
>>                   <heading>0.0</heading>
>>                   <tilt>0.0</tilt>
>>                   <range>16147.716881798802</range>
>>                   <altitudeMode>clampToGround</altitudeMode>
>>               </LookAt>
>>               <Url>
>>                   <href>http://localhost:8080/geoserver/geid_ws/wms?service=wms&amp;request=GetMap&amp;version=1.1.1&amp;format=application/vnd.google-earth.kml+xml&amp;layers=geid_ws:bmid-pipes&amp;styles=line&amp;height=2048&amp;width=2048&amp;transparent=false&amp;srs=EPSG:4326&amp;format_options=AUTOFIT:true;KMATTR:true;KMPLACEMARK:false;KMSCORE:40;MODE:refresh;SUPEROVERLAY:false</href>
>>                   <refreshInterval>0.0</refreshInterval>
>>                   <viewRefreshMode>onStop</viewRefreshMode>
>>                   <viewRefreshTime>1.0</viewRefreshTime>
>>                   <viewBoundScale>1.0</viewBoundScale>
>>               </Url>
>>           </NetworkLink>
>>       </Document>
>> </kml>
>>
>> _______________________________________________
>> Users mailing list
>> [hidden email]
>> http://lists.osgeo.org/mailman/listinfo/openlayers-users
> --
> Alexandre Dubé
> T: +1 418-696-5056 #203
> http://www.mapgears.com/
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.osgeo.org/mailman/listinfo/openlayers-users
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.osgeo.org/mailman/listinfo/openlayers-users

--
Alexandre Dubé
T: +1 418-696-5056 #203
http://www.mapgears.com/

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

Re: KML layer vector empty

burton449
Jair,

Im not sure if its the problem, but it seems your url is wrong. There is a space before the slash that have to be removed

see:

url: 'https://dl.dropboxusercontent.com/s/ea4qzzuyk5i2mxt /geid_ws-bmid-pipes.kml?dl=0',

If that's not related to your problem, Alexandre's suggestion is good place to ask your question.

Cheers,

Max Demars

On Fri, Oct 16, 2015 at 2:05 PM, Alexandre Dubé <[hidden email]> wrote:
Sorry about that.  Here you go:

http://stackoverflow.com/questions/tagged/openlayers-3

Alexandre


On 15-10-16 12:48 PM, Jair Santos wrote:
Thank you, but could you please clarify Alexandre.

Is this not an openlayers user list?

Cheers.

JJ.

-----Original Message-----
From: Users [mailto:[hidden email]] On Behalf Of Alexandre Dubé
Sent: Friday, October 16, 2015 8:41 AM
To: [hidden email]
Subject: Re: [OpenLayers-Users] KML layer vector empty

Hello,

    You should use StackOverflow for questions related to OpenLayers 3:
http://zeus.dev.where2getit.com/brooksbrothers/index_less_poi.html

    Also, a JSFiddle would be a good way to attract people into helping you.

Regards,

Alexandre


On 15-10-16 11:29 AM, Jair Santos wrote:
Hi all,

I am creating vector layers in format KML. I have the sources in drop box to avoid CORS, but when I load them in the map they have no features. Any ideas about this issue will be very much appreciated.

Thank you

JJ.

Please see below how I am doing it.

var layers = [
               
        wms_bmid_pipes = new ol.layer.Vector({
                                source: new ol.source.Vector({
                                url: 'https://dl.dropboxusercontent.com/s/ea4qzzuyk5i2mxt /geid_ws-bmid-pipes.kml?dl=0',
                                format: new ol.format.KML()
                                })
                        })
              ];
               

Since the layer does not show up in the map I ran the code below to check how many features it has (this code comes from the open layers web site). It turns out that in the console I get "Count after change: 0" , meaning that there are no features.
       
                wms_bmid_pipes.getSource().on('change', function(evt){
                        var source = evt.target;
                                if (source.getState() === 'ready') {
                                        var numFeatures = source.getFeatures().length;
                                        console.log("Count after change: " + numFeatures);
                                }
                });


The point is that the wms_bmid_pipes  contains this:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <kml
xmlns="http://www.opengis.net/kml/2.2" xmlns:ns2="http://www.google.com/kml/ext/2.2" xmlns:ns3="http://www.w3.org/2005/Atom" xmlns:ns4="urn:oasis:names:tc:ciq:xsdschema:xAL:2.0">
      <Document>
          <LookAt>
              <longitude>-119.3597596329119</longitude>
              <latitude>49.89850519575446</latitude>
              <altitude>19983.<a href="tel:5008834143" value="+15008834143" target="_blank">5008834143</altitude>
              <heading>0.0</heading>
              <tilt>0.0</tilt>
              <range>16147.716881798802</range>
              <altitudeMode>clampToGround</altitudeMode>
          </LookAt>
          <NetworkLink>
              <name>bmid-pipes</name>
              <visibility>1</visibility>
              <open>1</open>
              <LookAt>
                  <longitude>-119.3597596329119</longitude>
                  <latitude>49.89850519575446</latitude>
                  <altitude>19983.<a href="tel:5008834143" value="+15008834143" target="_blank">5008834143</altitude>
                  <heading>0.0</heading>
                  <tilt>0.0</tilt>
                  <range>16147.716881798802</range>
                  <altitudeMode>clampToGround</altitudeMode>
              </LookAt>
              <Url>
                  <href>http://localhost:8080/geoserver/geid_ws/wms?service=wms&amp;request=GetMap&amp;version=1.1.1&amp;format=application/vnd.google-earth.kml+xml&amp;layers=geid_ws:bmid-pipes&amp;styles=line&amp;height=2048&amp;width=2048&amp;transparent=false&amp;srs=EPSG:4326&amp;format_options=AUTOFIT:true;KMATTR:true;KMPLACEMARK:false;KMSCORE:40;MODE:refresh;SUPEROVERLAY:false</href>
                  <refreshInterval>0.0</refreshInterval>
                  <viewRefreshMode>onStop</viewRefreshMode>
                  <viewRefreshTime>1.0</viewRefreshTime>
                  <viewBoundScale>1.0</viewBoundScale>
              </Url>
          </NetworkLink>
      </Document>
</kml>

_______________________________________________
Users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/openlayers-users
--
Alexandre Dubé
T: <a href="tel:%2B1%20418-696-5056%20%23203" value="+14186965056" target="_blank">+1 418-696-5056 #203
http://www.mapgears.com/

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

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

--
Alexandre Dubé
T: <a href="tel:%2B1%20418-696-5056%20%23203" value="+14186965056" target="_blank">+1 418-696-5056 #203
http://www.mapgears.com/

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



--

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

Re: KML layer vector empty

Jsantos

 

Thank you.

 

No, the space was not the issue. I have the correct link in the openlayers file.

 

JJ.

From: Users [mailto:[hidden email]] On Behalf Of Maxime Demers
Sent: Friday, October 16, 2015 11:14 AM
To: Alexandre Dubé <[hidden email]>
Cc: openlayers-users <[hidden email]>
Subject: Re: [OpenLayers-Users] KML layer vector empty

 

Jair,

Im not sure if its the problem, but it seems your url is wrong. There is a space before the slash that have to be removed

see:

url: 'https://dl.dropboxusercontent.com/s/ea4qzzuyk5i2mxt /geid_ws-bmid-pipes.kml?dl=0',

If that's not related to your problem, Alexandre's suggestion is good place to ask your question.

Cheers,

Max Demars

 

On Fri, Oct 16, 2015 at 2:05 PM, Alexandre Dubé <[hidden email]> wrote:

Sorry about that.  Here you go:

http://stackoverflow.com/questions/tagged/openlayers-3

Alexandre



On 15-10-16 12:48 PM, Jair Santos wrote:

Thank you, but could you please clarify Alexandre.

Is this not an openlayers user list?

Cheers.

JJ.

-----Original Message-----
From: Users [mailto:[hidden email]] On Behalf Of Alexandre Dubé
Sent: Friday, October 16, 2015 8:41 AM
To: [hidden email]
Subject: Re: [OpenLayers-Users] KML layer vector empty

Hello,

    You should use StackOverflow for questions related to OpenLayers 3:
http://zeus.dev.where2getit.com/brooksbrothers/index_less_poi.html

    Also, a JSFiddle would be a good way to attract people into helping you.

Regards,

Alexandre


On 15-10-16 11:29 AM, Jair Santos wrote:

Hi all,

I am creating vector layers in format KML. I have the sources in drop box to avoid CORS, but when I load them in the map they have no features. Any ideas about this issue will be very much appreciated.

Thank you

JJ.

Please see below how I am doing it.

var layers = [
               
        wms_bmid_pipes = new ol.layer.Vector({
                                source: new ol.source.Vector({
                                url: 'https://dl.dropboxusercontent.com/s/ea4qzzuyk5i2mxt /geid_ws-bmid-pipes.kml?dl=0',
                                format: new ol.format.KML()
                                })
                        })
              ];
               

Since the layer does not show up in the map I ran the code below to check how many features it has (this code comes from the open layers web site). It turns out that in the console I get "Count after change: 0" , meaning that there are no features.
       
                wms_bmid_pipes.getSource().on('change', function(evt){
                        var source = evt.target;
                                if (source.getState() === 'ready') {
                                        var numFeatures = source.getFeatures().length;
                                        console.log("Count after change: " + numFeatures);
                                }
                });


The point is that the wms_bmid_pipes  contains this:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <kml
xmlns="http://www.opengis.net/kml/2.2" xmlns:ns2="http://www.google.com/kml/ext/2.2" xmlns:ns3="http://www.w3.org/2005/Atom" xmlns:ns4="urn:oasis:names:tc:ciq:xsdschema:xAL:2.0">
      <Document>
          <LookAt>
              <longitude>-119.3597596329119</longitude>
              <latitude>49.89850519575446</latitude>
              <altitude>19983.<a href="tel:5008834143" target="_blank">5008834143</altitude>
              <heading>0.0</heading>
              <tilt>0.0</tilt>
              <range>16147.716881798802</range>
              <altitudeMode>clampToGround</altitudeMode>
          </LookAt>
          <NetworkLink>
              <name>bmid-pipes</name>
              <visibility>1</visibility>
              <open>1</open>
              <LookAt>
                  <longitude>-119.3597596329119</longitude>
                  <latitude>49.89850519575446</latitude>
                  <altitude>19983.<a href="tel:5008834143" target="_blank">5008834143</altitude>
                  <heading>0.0</heading>
                  <tilt>0.0</tilt>
                  <range>16147.716881798802</range>
                  <altitudeMode>clampToGround</altitudeMode>
              </LookAt>
              <Url>
                  <href>http://localhost:8080/geoserver/geid_ws/wms?service=wms&amp;request=GetMap&amp;version=1.1.1&amp;format=application/vnd.google-earth.kml+xml&amp;layers=geid_ws:bmid-pipes&amp;styles=line&amp;height=2048&amp;width=2048&amp;transparent=false&amp;srs=EPSG:4326&amp;format_options=AUTOFIT:true;KMATTR:true;KMPLACEMARK:false;KMSCORE:40;MODE:refresh;SUPEROVERLAY:false</href>
                  <refreshInterval>0.0</refreshInterval>
                  <viewRefreshMode>onStop</viewRefreshMode>
                  <viewRefreshTime>1.0</viewRefreshTime>
                  <viewBoundScale>1.0</viewBoundScale>
              </Url>
          </NetworkLink>
      </Document>
</kml>

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

--
Alexandre Dubé
T: <a href="tel:%2B1%20418-696-5056%20%23203" target="_blank">+1 418-696-5056 #203
http://www.mapgears.com/

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

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


--
Alexandre Dubé
T: <a href="tel:%2B1%20418-696-5056%20%23203" target="_blank">+1 418-696-5056 #203
http://www.mapgears.com/

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




--


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