zoukankan      html  css  js  c++  java
  • ArcGIS API for Silverlight overview

    1、a cross-browser, cross-platform development environment for building and delivering rich Internet applications (RIA) for the web

    2、You can also define the initial map extent and spatial reference in code-behind where you can use transformation logic to convert coordinates from one well-known spatial reference to another

    
    
    1 ESRI.ArcGIS.Client.Geometry.Envelope initialExtent = new
    2 ESRI.ArcGIS.Client.Geometry.Envelope(ESRI.ArcGIS.Client.Bing.Transform.GeographicToWebMercator( new
    3 ESRI.ArcGIS.Client.Geometry.MapPoint(-130, 20)),
    4 ESRI.ArcGIS.Client.Bing.Transform.GeographicToWebMercator(new ESRI.ArcGIS.Client.Geometry.MapPoint(-65, 55)));
    5  
    6 initialExtent.SpatialReference = new ESRI.ArcGIS.Client.Geometry.SpatialReference(102100);
    7  
    8 MyMap.Extent = initialExtent;
    View Code

    3、Map service layers come in two varieties, tiled and dynamic. Tiled service layers provide access to a set of map image tiles organized into predefined scale levels and hosted on a remote server. Dynamic service layers provide access to map and image services that generate map images on-the-fly.

    1 <esri:ArcGISDynamicMapServiceLayer ID="CaliforniaLayer"
    2   Url="http://serverapps.esri.com/ArcGIS/rest/services/California/MapServer"
    3   Initialized="CaliforniaLayer_Initialized" />
    1 private void CaliforniaLayer_Initialized(object sender, EventArgs e)
    2 {
    3   Layer layer = sender as Layer;
    4   MyMap.ZoomTo(layer.FullExtent);
    5 }
    <esri:ArcGISDynamicMapServiceLayer ID="CaliforniaLayer" 
      Url="http://serverapps.esri.com/ArcGIS/rest/services/California/MapServer"
      InitializationFailed="CaliforniaLayer_InitializationFailed" />
    private void CaliforniaLayer_InitializationFailed(object sender, EventArgs e) 
    {
      Layer layer = sender as Layer;
      string exceptionMessage = layer.InitializationFailure.Message;
      MyTextBlock.Text = exceptionMessage;
    }

    Map member

    Map action

    Extent property

    Set to an ESRI.ArcGIS.Client.Geometry.Envelope. The map extent changes to the defined extent without animation. The actual extent of the map may not match the Envelope defined because the aspect ratio of the map must be preserved. To discover the actual extent, handle the ExtentChanged event on the map and use the NewExtent property on the event arguments. See the following code:

     

     
    ESRI.ArcGIS.Client.Geometry.Envelope envelope = new
    ESRI.ArcGIS.Client.Geometry.Envelope(-120, 20, -100, 40);
    MyMap.Extent = envelope;
    

    Zoom(factor) method

    Zoom in or out based on the factor (ratio) provided.

    > 1 = zoom in

    < 1 = zoom out

    See the following code:

     

     
    MyMap.Zoom(2);
    

    ZoomTo(geometry) method

    Zoom to an extent that includes the ESRI.ArcGIS.Client.Geometry passed to the method. The geometry cannot be of type MapPoint. Map animation operates during the extent change. See the following code:

     

     
    MyMap.ZoomTo(myPolygon);
    

    ZoomToResolution(double) method

    Zoom to a resolution defined as the number of map units per pixel. If you know the number of screen pixels per inch (for example, dots per inch [dpi] or pixels per inch [ppi]), you can accurately calculate map scale for the respective client. See the following code:

     

     
    TiledMapServiceLayer tiledLayer = 
    MyMap.Layers["StreetMapLayer"] as TiledMapServiceLayer;
    Lod lod = tiledLayer.TileInfo.Lods[5];
    MyMap.ZoomToResolution(lod.Resolution);
    

    PanTo(geometry) method

    Pan to an extent that centers on the ESRI.ArcGIS.Client.Geometry instance passed to the method. The map scale will not change. Map animation operates during the operation. See the following code:

     

     
    MyMap.PanTo(myPoint);
    
  • 相关阅读:
    Kubernetes之Ingress-Nginx
    Prometheus之AWS-EC2自动发现
    Prometheus之kubernetes-sd自动发现
    ORACLE 遇到ORA 03113 数据库连接卡住
    ORACLE 遇到ORA-31693 ORA-31617 ORA-19505 ORA-27037
    Oracle 计划任务批量清理临时表实例
    GO 基础
    CentOS 7.3安装完整开发环境
    3.6 String 与 切片&str的区别
    ubantu上编辑windows程序
  • 原文地址:https://www.cnblogs.com/rockman/p/3311424.html
Copyright © 2011-2022 走看看