0

基本代码:

protected function map_creationCompleteHandler(event:FlexEvent):void
{
  this.geocoder = new Geocoder(this.map.tileMap);
  this.geocoder.addEventListener(GeocoderEvent.GEOCODE_ERROR_EVENT,this.onGeocodeError);
  this.geocoder.addEventListener(GeocoderEvent.REVERSE_GEOCODE_RESPONSE,this.onReverseGeocodeResponse);
  this.geocoder.addEventListener(GeocoderEvent.HTTP_ERROR_EVENT,this.onHttpError);

  cursorManager.setBusyCursor();
  this.map.removeShapes();
  var ll:LatLng = new LatLng(Number('40.053097'), Number('-76.313652'));
  this.geocoder.reverseGeocode(ll);
}

private function onGeocodeError(e:GeocoderEvent):void 
{
  // trace the error..
}

private function onHttpError(e:GeocoderEvent):void 
{
    this.cursorManager.removeBusyCursor();
    this.makeErrorList("HTTP ERROR");
}

private function onReverseGeocodeResponse(event:GeocoderEvent):void 
{
    // Add the descriptive name to the locationg being geocoded.
}

在 onReverseGeocodeResponse 事件中,如何向位置工具提示添加描述性标签,以便当用户关注所指向的位置时,它将显示我添加的标签,包括地图服务定位的完整地址?

还有一种方法可以在位置工具提示上添加一个按钮,以便在单击该按钮时可以执行其他功能?

4

1 回答 1

0

兴趣点是需要修改的属性。

于 2013-04-18T14:37:53.600 回答