<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.hoenzb
        {mso-style-name:hoenzb;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:#002060;
        font-weight:normal;
        font-style:normal;
        text-decoration:none none;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-size:9.0pt;font-family:"Calibri",sans-serif;color:#002060'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:9.0pt;font-family:"Calibri",sans-serif;color:#002060'>Thank you.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:9.0pt;font-family:"Calibri",sans-serif;color:#002060'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:9.0pt;font-family:"Calibri",sans-serif;color:#002060'>No, the space was not the issue. I have the correct link in the openlayers file.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:9.0pt;font-family:"Calibri",sans-serif;color:#002060'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:9.0pt;font-family:"Calibri",sans-serif;color:#002060'>JJ.<o:p></o:p></span></p><p class=MsoNormal><b><span style='font-size:11.0pt;font-family:"Calibri",sans-serif'>From:</span></b><span style='font-size:11.0pt;font-family:"Calibri",sans-serif'> Users [mailto:openlayers-users-bounces@lists.osgeo.org] <b>On Behalf Of </b>Maxime Demers<br><b>Sent:</b> Friday, October 16, 2015 11:14 AM<br><b>To:</b> Alexandre Dubé <adube@mapgears.com><br><b>Cc:</b> openlayers-users <openlayers-users@lists.osgeo.org><br><b>Subject:</b> Re: [OpenLayers-Users] KML layer vector empty<o:p></o:p></span></p><p class=MsoNormal><o:p> </o:p></p><div><div><div><div><div><p class=MsoNormal style='margin-bottom:12.0pt'>Jair,<o:p></o:p></p></div><p class=MsoNormal style='margin-bottom:12.0pt'>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<br><br>see:<br><br>url: '<a href="https://dl.dropboxusercontent.com/s/ea4qzzuyk5i2mxt" target="_blank">https://dl.dropboxusercontent.com/s/ea4qzzuyk5i2mxt </a>/geid_ws-bmid-pipes.kml?dl=0',<o:p></o:p></p></div><p class=MsoNormal style='margin-bottom:12.0pt'>If that's not related to your problem, Alexandre's suggestion is good place to ask your question.<o:p></o:p></p></div><p class=MsoNormal style='margin-bottom:12.0pt'>Cheers,<o:p></o:p></p></div><p class=MsoNormal>Max Demars<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p><div><p class=MsoNormal>On Fri, Oct 16, 2015 at 2:05 PM, Alexandre Dubé <<a href="mailto:adube@mapgears.com" target="_blank">adube@mapgears.com</a>> wrote:<o:p></o:p></p><blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in'><p class=MsoNormal>Sorry about that.  Here you go:<br><br><a href="http://stackoverflow.com/questions/tagged/openlayers-3" target="_blank">http://stackoverflow.com/questions/tagged/openlayers-3</a><span style='color:#888888'><br><br><span class=hoenzb>Alexandre</span></span><o:p></o:p></p><div><div><p class=MsoNormal><br><br>On 15-10-16 12:48 PM, Jair Santos wrote:<o:p></o:p></p><blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in'><p class=MsoNormal>Thank you, but could you please clarify Alexandre.<br><br>Is this not an openlayers user list?<br><br>Cheers.<br><br>JJ.<br><br>-----Original Message-----<br>From: Users [mailto:<a href="mailto:openlayers-users-bounces@lists.osgeo.org" target="_blank">openlayers-users-bounces@lists.osgeo.org</a>] On Behalf Of Alexandre Dubé<br>Sent: Friday, October 16, 2015 8:41 AM<br>To: <a href="mailto:openlayers-users@lists.osgeo.org" target="_blank">openlayers-users@lists.osgeo.org</a><br>Subject: Re: [OpenLayers-Users] KML layer vector empty<br><br>Hello,<br><br>    You should use StackOverflow for questions related to OpenLayers 3:<br><a href="http://zeus.dev.where2getit.com/brooksbrothers/index_less_poi.html" target="_blank">http://zeus.dev.where2getit.com/brooksbrothers/index_less_poi.html</a><br><br>    Also, a JSFiddle would be a good way to attract people into helping you.<br><br>Regards,<br><br>Alexandre<br><br><br>On 15-10-16 11:29 AM, Jair Santos wrote:<o:p></o:p></p><blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in'><p class=MsoNormal>Hi all,<br><br>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.<br><br>Thank you<br><br>JJ.<br><br>Please see below how I am doing it.<br><br>var layers = [<br>                <br>        wms_bmid_pipes = new ol.layer.Vector({<br>                                source: new ol.source.Vector({<br>                                url: '<a href="https://dl.dropboxusercontent.com/s/ea4qzzuyk5i2mxt" target="_blank">https://dl.dropboxusercontent.com/s/ea4qzzuyk5i2mxt</a> /geid_ws-bmid-pipes.kml?dl=0',<br>                                format: new ol.format.KML()<br>                                })<br>                        })<br>              ];<br>                <br><br>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.<br>        <br>                wms_bmid_pipes.getSource().on('change', function(evt){<br>                        var source = evt.target;<br>                                if (source.getState() === 'ready') {<br>                                        var numFeatures = source.getFeatures().length;<br>                                        console.log("Count after change: " + numFeatures);<br>                                }<br>                });<br><br><br>The point is that the wms_bmid_pipes  contains this:<br><br><?xml version="1.0" encoding="UTF-8" standalone="yes"?> <kml<br>xmlns="<a href="http://www.opengis.net/kml/2.2" target="_blank">http://www.opengis.net/kml/2.2</a>" xmlns:ns2="<a href="http://www.google.com/kml/ext/2.2" target="_blank">http://www.google.com/kml/ext/2.2</a>" xmlns:ns3="<a href="http://www.w3.org/2005/Atom" target="_blank">http://www.w3.org/2005/Atom</a>" xmlns:ns4="urn:oasis:names:tc:ciq:xsdschema:xAL:2.0"><br>      <Document><br>          <LookAt><br>              <longitude>-119.3597596329119</longitude><br>              <latitude>49.89850519575446</latitude><br>              <altitude>19983.<a href="tel:5008834143" target="_blank">5008834143</a></altitude><br>              <heading>0.0</heading><br>              <tilt>0.0</tilt><br>              <range>16147.716881798802</range><br>              <altitudeMode>clampToGround</altitudeMode><br>          </LookAt><br>          <NetworkLink><br>              <name>bmid-pipes</name><br>              <visibility>1</visibility><br>              <open>1</open><br>              <LookAt><br>                  <longitude>-119.3597596329119</longitude><br>                  <latitude>49.89850519575446</latitude><br>                  <altitude>19983.<a href="tel:5008834143" target="_blank">5008834143</a></altitude><br>                  <heading>0.0</heading><br>                  <tilt>0.0</tilt><br>                  <range>16147.716881798802</range><br>                  <altitudeMode>clampToGround</altitudeMode><br>              </LookAt><br>              <Url><br>                  <href><a 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" target="_blank">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</a></href><br>                  <refreshInterval>0.0</refreshInterval><br>                  <viewRefreshMode>onStop</viewRefreshMode><br>                  <viewRefreshTime>1.0</viewRefreshTime><br>                  <viewBoundScale>1.0</viewBoundScale><br>              </Url><br>          </NetworkLink><br>      </Document><br></kml><br><br>_______________________________________________<br>Users mailing list<br><a href="mailto:Users@lists.osgeo.org" target="_blank">Users@lists.osgeo.org</a><br><a href="http://lists.osgeo.org/mailman/listinfo/openlayers-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/openlayers-users</a><o:p></o:p></p></blockquote><p class=MsoNormal>--<br>Alexandre Dubé<br>T: <a href="tel:%2B1%20418-696-5056%20%23203" target="_blank">+1 418-696-5056 #203</a><br><a href="http://www.mapgears.com/" target="_blank">http://www.mapgears.com/</a><br><br>_______________________________________________<br>Users mailing list<br><a href="mailto:Users@lists.osgeo.org" target="_blank">Users@lists.osgeo.org</a><br><a href="http://lists.osgeo.org/mailman/listinfo/openlayers-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/openlayers-users</a><br><br>_______________________________________________<br>Users mailing list<br><a href="mailto:Users@lists.osgeo.org" target="_blank">Users@lists.osgeo.org</a><br><a href="http://lists.osgeo.org/mailman/listinfo/openlayers-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/openlayers-users</a><o:p></o:p></p></blockquote><p class=MsoNormal><br>-- <br>Alexandre Dubé<br>T: <a href="tel:%2B1%20418-696-5056%20%23203" target="_blank">+1 418-696-5056 #203</a><br><a href="http://www.mapgears.com/" target="_blank">http://www.mapgears.com/</a><br><br>_______________________________________________<br>Users mailing list<br><a href="mailto:Users@lists.osgeo.org" target="_blank">Users@lists.osgeo.org</a><br><a href="http://lists.osgeo.org/mailman/listinfo/openlayers-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/openlayers-users</a><o:p></o:p></p></div></div></blockquote></div><p class=MsoNormal><br><br clear=all><br>-- <o:p></o:p></p><div><div><div><div><div><p class=MsoNormal>Stack Overflow: <a href="http://stackoverflow.com/users/1914034/burton449" target="_blank">http://stackoverflow.com/users/1914034/burton449</a><o:p></o:p></p></div></div><p class=MsoNormal>GIS Overflow: <a href="http://gis.stackexchange.com/users/14426/burton449" target="_blank">http://gis.stackexchange.com/users/14426/burton449</a><o:p></o:p></p></div><p class=MsoNormal>LastFm: <a href="http://www.lastfm.fr/user/burton449" target="_blank">http://www.lastfm.fr/user/burton449</a><o:p></o:p></p></div></div></div></div></body></html>