/** * Perform search in map mode. * * @param q * @return */ public String performSearchMap(String q, Integer zoom) throws GeocoderException { GImage gImage; GPoint gPoint; int zoomInt = (zoom == null) ? GoogleCalculator.INITIAL_ZOOM : zoom.intValue(); GLatLng gLatLng = doSearch(q); if (gLatLng != null) { gPoint = this.calc.fromLatLngToPixel(gLatLng, zoomInt); } else { zoomInt = GoogleCalculator.WORLD_ZOOM; gPoint = this.calc.fromLatLngToPixel(GoogleCalculator.WORLD_LAT_LNG, zoomInt); } gImage = this.calc.fromGPixelToGImage(gPoint); return getMainMapImagesList(gImage.getImgX(), gImage.getImgY(), zoomInt); }
/** * Get map images list for given satellite coordinate. * * @param t satellite coordinate * @param area * @return */ public String getMapImagesListFromTxt(String t, int offx, int offy) { GGeoString geoString = new GGeoString(t, offx, offy); GImage gImage = this.calc.fromGeoStringToGImage(geoString); int zoom = this.calc.fromTxtZoomToCoordZoom(geoString.getZoom()); return getMainMapImagesList(gImage.getImgX(), gImage.getImgY(), zoom); }