/** * Callback called by LocationFinder once it has found the location - passes a LonLat object * containing information on the location. */ public void onLocationFound(LonLat ll) { if (ll != null) { msgBox("Found Location - " + ll.toStr() + ". Looking up address...."); AddressLookup al = new AddressLookup(this); al.doLookup(ll); // onAddressFound caled with address when found. } else { msgBox("Failed to find location"); } }
public void onAddressFound(LonLat ll, String addressStr) { String resultStr = addressStr + "\n" + ll.toStr(); Log.d("testButton", "resultStr=" + resultStr); Log.d("testButton", ll.toString()); msgBox(resultStr); }
public void setCenter(LonLat lonlat, int zoom) { MapImpl.setCenter(getJSObject(), lonlat.getJSObject(), zoom); }
public void panTo(LonLat lonlat) { MapImpl.panTo(getJSObject(), lonlat.getJSObject()); }
public void setCenter(LonLat lonlat) { MapImpl.setCenter(getJSObject(), lonlat.getJSObject()); }
/** * APIMethod: getLayerPxFromLonLat * * <p>Parameters: * * @param lonlat {<OpenLayers.LonLat>} lonlat * @return {<OpenLayers.Pixel>} An OpenLayers.Pixel which is the passed-in <OpenLayers.LonLat>, * translated into layer pixels by the current base layer */ public Pixel getLayerPxFromLonLat(LonLat lonlat) { return new Pixel(MapImpl.getLayerPxFromLonLat(getJSObject(), lonlat.getJSObject())); }
/** * APIMethod: containsLonLat * * <p>Parameters: ll - {<OpenLayers.LonLat>} inclusive - {Boolean} Whether or not to include the * border. Default is true. * * <p>Returns: {Boolean} The passed-in lonlat is within this bounds. */ public boolean containsLonLat(LonLat ll, boolean inclusive) { return BoundsImpl.containsLonLat(getJSObject(), ll.getJSObject(), inclusive); }
/** * Scales the bounds around a LonLat. * * @param ratio * @param origin default is center * @return a new bounds that is scaled by ratio from origin */ public Bounds scale(float ratio, LonLat origin) { JSObject originJsObj = (origin == null) ? null : origin.getJSObject(); return Bounds.narrowToBounds(BoundsImpl.scale(this.getJSObject(), ratio, originJsObj)); }
public void extend(LonLat lonLat) { BoundsImpl.extend(this.getJSObject(), lonLat.getJSObject()); }
/** @return the center of the bounds in map space */ public LonLat getCenterLonLat() { return LonLat.narrowToLonLat(BoundsImpl.getCenterLonLat(this.getJSObject())); }