Revision 32090 branches/v2_0_0_prep/extensions/extGeocoding/src/org/gvsig/geocoding/extension/GeocodingController.java

View differences:

GeocodingController.java
65 65
import org.gvsig.fmap.mapcontext.layers.FLayers;
66 66
import org.gvsig.fmap.mapcontext.layers.vectorial.FLyrVect;
67 67
import org.gvsig.fmap.mapcontext.layers.vectorial.GraphicLayer;
68
import org.gvsig.fmap.mapcontext.rendering.legend.IVectorLegend;
69 68
import org.gvsig.fmap.mapcontext.rendering.legend.IVectorialUniqueValueLegend;
70 69
import org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol;
71 70
import org.gvsig.fmap.mapcontrol.MapControl;
......
87 86
import org.gvsig.geocoding.styles.impl.AbstractRange;
88 87
import org.gvsig.geocoding.styles.impl.Composed;
89 88
import org.gvsig.geocoding.styles.impl.SimpleCentroid;
89
import org.gvsig.geocoding.tasks.GeocodingTask;
90
import org.gvsig.geocoding.tasks.IndexingTask;
90 91
import org.gvsig.geocoding.utils.GeocodingExtTags;
91 92
import org.gvsig.geocoding.utils.GeocodingUtils;
92 93
import org.gvsig.geocoding.utils.PatternLoaderThread;
......
153 154
	}
154 155

  
155 156
	/**
157
	 * Run the indexing process in background
158
	 */
159
	public void indexing() {
160
		PluginServices.cancelableBackgroundExecution(new IndexingTask(this));
161
	}
162

  
163
	/**
156 164
	 * This method loads a Pattern from XML file
157 165
	 * 
158 166
	 * @return true if the load is succesfully
......
637 645
		if (siz > 0) {
638 646
			grphclyr.clearAllGraphics();
639 647
		}
640
		
648

  
641 649
		int i = 1;
642 650
		for (GeocodingResult res : result) {
643 651
			if (res.getScore() >= score && i <= max) {
......
703 711
	private IVectorialUniqueValueLegend buildPointLegend() {
704 712

  
705 713
		MapContextManager mapContextManager = MapContextLocator
706
				.getMapContextManager();		
707
		
714
				.getMapContextManager();
715

  
708 716
		IVectorialUniqueValueLegend legend = (IVectorialUniqueValueLegend) mapContextManager
709 717
				.createLegend(IVectorialUniqueValueLegend.LEGEND_NAME);
710 718
		legend.setShapeType(Geometry.TYPES.POINT);

Also available in: Unified diff