From michael.grauer at kitware.com Thu Mar 17 12:00:26 2016 From: michael.grauer at kitware.com (Michael Grauer) Date: Thu, 17 Mar 2016 12:00:26 -0400 Subject: [Geojs-users] deleting layers in geojs 0.8.0 Message-ID: Hi GeoJsers, 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. My GeoJs map is 'map', and I'm creating multiple feature layers, and also some WMS layers. 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? e.g. to create and then delete a layer would I do: var map = geo.map({whatever}) var layer = map.createLayer('feature'); layer.clear(); map.deleteLayer(layer); map.draw(); Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.manthey at kitware.com Thu Mar 17 12:03:22 2016 From: david.manthey at kitware.com (David Manthey) Date: Thu, 17 Mar 2016 12:03:22 -0400 Subject: [Geojs-users] deleting layers in geojs 0.8.0 In-Reply-To: References: Message-ID: 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. On Thu, Mar 17, 2016 at 12:00 PM, Michael Grauer wrote: > Hi GeoJsers, > > 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. > > My GeoJs map is 'map', and I'm creating multiple feature layers, and also > some WMS layers. > > 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? > > e.g. to create and then delete a layer would I do: > > var map = geo.map({whatever}) > var layer = map.createLayer('feature'); > layer.clear(); > map.deleteLayer(layer); > map.draw(); > > > Thanks > > > _______________________________________________ > Geojs-users mailing list > Geojs-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/geojs-users > > -- David Manthey R&D Engineer Kitware Inc. (518) 881-4439 -------------- next part -------------- An HTML attachment was scrubbed... URL: From david.manthey at kitware.com Thu Mar 17 12:04:27 2016 From: david.manthey at kitware.com (David Manthey) Date: Thu, 17 Mar 2016 12:04:27 -0400 Subject: [Geojs-users] deleting layers in geojs 0.8.0 In-Reply-To: References: Message-ID: The tiles example will delete and recreate the tile layer if you change certain properties. The reprojection example does this, too. On Thu, Mar 17, 2016 at 12:03 PM, David Manthey wrote: > 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. > > On Thu, Mar 17, 2016 at 12:00 PM, Michael Grauer < > michael.grauer at kitware.com> wrote: > >> Hi GeoJsers, >> >> 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. >> >> My GeoJs map is 'map', and I'm creating multiple feature layers, and also >> some WMS layers. >> >> 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? >> >> e.g. to create and then delete a layer would I do: >> >> var map = geo.map({whatever}) >> var layer = map.createLayer('feature'); >> layer.clear(); >> map.deleteLayer(layer); >> map.draw(); >> >> >> Thanks >> >> >> _______________________________________________ >> Geojs-users mailing list >> Geojs-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/geojs-users >> >> > > > -- > David Manthey > R&D Engineer > Kitware Inc. > (518) 881-4439 > -- David Manthey R&D Engineer Kitware Inc. (518) 881-4439 -------------- next part -------------- An HTML attachment was scrubbed... URL: From jonathan.beezley at kitware.com Thu Mar 17 12:06:10 2016 From: jonathan.beezley at kitware.com (Jonathan Beezley) Date: Thu, 17 Mar 2016 12:06:10 -0400 Subject: [Geojs-users] deleting layers in geojs 0.8.0 In-Reply-To: References: Message-ID: What is the weird behavior? There is a bug in the most recently released version that will cause slowness when you zoom in on a WMS layer. On Thu, Mar 17, 2016 at 12:00 PM, Michael Grauer wrote: > Hi GeoJsers, > > 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. > > My GeoJs map is 'map', and I'm creating multiple feature layers, and also > some WMS layers. > > 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? > > e.g. to create and then delete a layer would I do: > > var map = geo.map({whatever}) > var layer = map.createLayer('feature'); > layer.clear(); > map.deleteLayer(layer); > map.draw(); > > > Thanks > > > _______________________________________________ > Geojs-users mailing list > Geojs-users at public.kitware.com > http://public.kitware.com/mailman/listinfo/geojs-users > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From michael.grauer at kitware.com Thu Mar 17 13:20:43 2016 From: michael.grauer at kitware.com (Michael Grauer) Date: Thu, 17 Mar 2016 13:20:43 -0400 Subject: [Geojs-users] deleting layers in geojs 0.8.0 In-Reply-To: References: Message-ID: Thanks for the info. The weirdness is all on my end I realized. I thought `this` was `that`, but it was `this`. On Thu, Mar 17, 2016 at 12:06 PM, Jonathan Beezley < jonathan.beezley at kitware.com> wrote: > What is the weird behavior? There is a bug in the most recently released > version that will cause slowness when you zoom in on a WMS layer. > > On Thu, Mar 17, 2016 at 12:00 PM, Michael Grauer < > michael.grauer at kitware.com> wrote: > >> Hi GeoJsers, >> >> 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. >> >> My GeoJs map is 'map', and I'm creating multiple feature layers, and also >> some WMS layers. >> >> 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? >> >> e.g. to create and then delete a layer would I do: >> >> var map = geo.map({whatever}) >> var layer = map.createLayer('feature'); >> layer.clear(); >> map.deleteLayer(layer); >> map.draw(); >> >> >> Thanks >> >> >> _______________________________________________ >> Geojs-users mailing list >> Geojs-users at public.kitware.com >> http://public.kitware.com/mailman/listinfo/geojs-users >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: