/**
  * 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);
 }
Exemple #3
0
 public void setCenter(LonLat lonlat, int zoom) {
   MapImpl.setCenter(getJSObject(), lonlat.getJSObject(), zoom);
 }
Exemple #4
0
 public void panTo(LonLat lonlat) {
   MapImpl.panTo(getJSObject(), lonlat.getJSObject());
 }
Exemple #5
0
 public void setCenter(LonLat lonlat) {
   MapImpl.setCenter(getJSObject(), lonlat.getJSObject());
 }
Exemple #6
0
 /**
  * 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()));
 }
Exemple #7
0
 /**
  * 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);
 }
Exemple #8
0
 /**
  * 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));
 }
Exemple #9
0
 public void extend(LonLat lonLat) {
   BoundsImpl.extend(this.getJSObject(), lonLat.getJSObject());
 }
Exemple #10
0
 /** @return the center of the bounds in map space */
 public LonLat getCenterLonLat() {
   return LonLat.narrowToLonLat(BoundsImpl.getCenterLonLat(this.getJSObject()));
 }