Re: [OpenMap Users] [PATCH] MultiShapeLayer.java

From: Don Dietrick <dietrick@bbn.com>
Date: Fri May 14 2004 - 16:17:30 EDT

Hi Michael,

Thanks for sending the patch in, I'm checking it in now.

- Don

On May 14, 2004, at 3:55 PM, MNewcomb@tacintel.com wrote:

> Using MultiShapeLayer caused error when Views->Go Over
> Data->'multi-shape-layer'.
>
> - spatialIndexes is a collection of SpatialIndexHandler objects not
> SpatialIndex objects (caused ClassCastException)
> - box was always null (caused "can't move map over data" when
> ClassCastException was fixed)
>
> 'cvs diff -u' was returning some weird stuff... So, here is the method
> to
> patch:
>
> Previous method:
>
> ***************************************
> public DataBounds getDataBounds() {
> DataBounds box = null;
>
> ESRIBoundingBox bounds = new ESRIBoundingBox();
> Iterator sii = spatialIndexes.iterator();
> while (sii.hasNext()) {
> SpatialIndex si = (SpatialIndex)sii.next();
> if (si != null) {
> ESRIBoundingBox boundingBox = spatialIndex.getBounds();
> if (bounds != null) {
> bounds.addBounds(boundingBox);
> }
> }
> }
> return box;
> }
> ***************************************
>
> New method:
>
> ***************************************
> public DataBounds getDataBounds() {
> ESRIBoundingBox bounds = new ESRIBoundingBox();
> Iterator sii = spatialIndexes.iterator();
> while (sii.hasNext()) {
> SpatialIndexHandler sih = (SpatialIndexHandler)sii.next();
> if (sih != null && sih.spatialIndex != null) {
> ESRIBoundingBox boundingBox =
> sih.spatialIndex.getBounds();
> if (bounds != null) {
> bounds.addBounds(boundingBox);
> }
> }
> }
> return new DataBounds(bounds.min.x, bounds.min.y,
> bounds.max.x, bounds.max.y);
> }
> ***************************************
>
> Michael
> --
> [To unsubscribe to this list send an email to "majdart@bbn.com"
> with the following text in the BODY of the message "unsubscribe
> openmap-users"]
>
>

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Don Dietrick, dietrick@bbn.com
BBN Technologies, Cambridge, MA
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

--
[To unsubscribe to this list send an email to "majdart@bbn.com"
with the following text in the BODY of the message "unsubscribe openmap-users"]
Received on Fri May 14 16:17:46 2004

This archive was generated by hypermail 2.1.8 : Thu May 12 2005 - 07:18:38 EDT