<div dir="ltr">The tiles example will delete and recreate the tile layer if you change certain properties. The reprojection example does this, too.</div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Mar 17, 2016 at 12:03 PM, David Manthey <span dir="ltr"><<a href="mailto:david.manthey@kitware.com" target="_blank">david.manthey@kitware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Yes, but you don't need to call layer.clear() if you are deleting the layer, as the layer destructor (called in map.deleteLayer) will call it. </div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On Thu, Mar 17, 2016 at 12:00 PM, Michael Grauer <span dir="ltr"><<a href="mailto:michael.grauer@kitware.com" target="_blank">michael.grauer@kitware.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr">Hi GeoJsers,<div><br></div><div>I'm seeing some weird behavior during a Minerva refactor, which is likely on my end, but I'd like to take the opportunity to get the blessed version of deleting layers in GeoJs.</div><div><br></div><div>My GeoJs map is 'map', and I'm creating multiple feature layers, and also some WMS layers.</div><div><br></div><div>I've done various combinations of calling 'map.deleteLayer', 'layer.clear', 'map.draw' to try deleting feature layers. What is the correct way to do it?</div><div><br></div><div>e.g. to create and then delete a layer would I do:</div><div><br></div><div>var map = geo.map({whatever})</div><div>var layer = map.createLayer('feature');</div><div>layer.clear();</div><div>map.deleteLayer(layer);</div><div>map.draw();</div><div><br></div><div><br></div><div>Thanks</div><div><br></div></div>
<br></div></div>_______________________________________________<br>
Geojs-users mailing list<br>
<a href="mailto:Geojs-users@public.kitware.com" target="_blank">Geojs-users@public.kitware.com</a><br>
<a href="http://public.kitware.com/mailman/listinfo/geojs-users" rel="noreferrer" target="_blank">http://public.kitware.com/mailman/listinfo/geojs-users</a><br>
<br></blockquote></div><span class="HOEnZb"><font color="#888888"><br><br clear="all"><div><br></div>-- <br><div><div dir="ltr"><div><div dir="ltr">David Manthey</div><div dir="ltr">R&D Engineer<br>Kitware Inc.<br><a href="tel:%28518%29%20881-4439" value="+15188814439" target="_blank">(518) 881-4439</a><br></div></div></div></div>
</font></span></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr">David Manthey</div><div dir="ltr">R&D Engineer<br>Kitware Inc.<br>(518) 881-4439<br></div></div></div></div>
</div>