Revision 31285 branches/v2_0_0_prep/extensions/extGeocoding/src/org/gvsig/geocoding/extension/GeocodingController.java
GeocodingController.java | ||
---|---|---|
186 | 186 |
PatternLoaderThread load = new PatternLoaderThread(thefile); |
187 | 187 |
load.run(); |
188 | 188 |
ok = load.isOk(); |
189 |
if (ok) {
|
|
189 |
if (ok) { |
|
190 | 190 |
this.gmodel.setPatternFile(load.getFile()); |
191 | 191 |
this.gmodel.setPattern(load.getPattern()); |
192 | 192 |
} |
... | ... | |
509 | 509 |
Point pto1 = new Point2D(minX, minY); |
510 | 510 |
Point pto2 = new Point2D(minX + width, minY + height); |
511 | 511 |
Envelope enve = new Envelope2D(pto1, pto2); |
512 |
mapControl.getViewPort().setEnvelope(enve); |
|
512 |
if(enve != null){ |
|
513 |
mapControl.getViewPort().setEnvelope(enve); |
|
514 |
} |
|
515 |
|
|
513 | 516 |
} |
514 | 517 |
|
515 | 518 |
} |
... | ... | |
616 | 619 |
MapControl mapControl = new MapControl(); |
617 | 620 |
mapControl.setMapContext(mapContext); |
618 | 621 |
GraphicLayer grphclyr = mapControl.getMapContext().getGraphicsLayer(); |
619 |
grphclyr.clearAllGraphics(); |
|
622 |
long siz = 0; |
|
623 |
try { |
|
624 |
siz = ((FeatureSet) grphclyr.getDataStore().getDataSet()).getSize(); |
|
625 |
} catch (DataException e) { |
|
626 |
e.printStackTrace(); |
|
627 |
} |
|
628 |
if (siz > 0) { |
|
629 |
grphclyr.clearAllGraphics(); |
|
630 |
} |
|
620 | 631 |
|
621 | 632 |
int idSymbol; |
622 | 633 |
int i = 1; |
Also available in: Unified diff