Click or drag to resize

MapPoint Constructor (Double, Double, SpatialReference)

Initializes a new instance of the MapPoint class.

Namespace:  Esri.ArcGISRuntime.Geometry
Assembly:  Esri.ArcGISRuntime (in Esri.ArcGISRuntime.dll) Version: 100.11.0
Syntax
public MapPoint(
	double x,
	double y,
	SpatialReference spatialReference
)

Parameters

x
Type: SystemDouble
x
y
Type: SystemDouble
y
spatialReference
Type: Esri.ArcGISRuntime.GeometrySpatialReference
Spatial Reference
Examples

WPF

Example Name: SetMinMaxScale

Restrict zooming between specific scale ranges.

Code example screen shot.

C#
// Copyright 2016 Esri.
// 
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
// You may obtain a copy of the License at: http://www.apache.org/licenses/LICENSE-2.0
// 
// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an 
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific 
// language governing permissions and limitations under the License.

using Esri.ArcGISRuntime.Geometry;
using Esri.ArcGISRuntime.Mapping;

namespace ArcGISRuntime.WPF.Samples.SetMinMaxScale
{
    [ArcGISRuntime.Samples.Shared.Attributes.Sample(
        name: "Set min & max scale",
        category: "Map",
        description: "Restrict zooming between specific scale ranges.",
        instructions: "Zoom in and out of the map. The zoom extents of the map are limited between the given minimum and maximum scales.",
        tags: new[] { "area of interest", "level of detail", "maximum", "minimum", "scale", "viewpoint" })]
    public partial class SetMinMaxScale
    {
        public SetMinMaxScale()
        {
            InitializeComponent();
            Initialize();
        }

        private void Initialize()
        {
            // Create new Map with Streets basemap 
            Map myMap = new Map(BasemapStyle.ArcGISStreets)
            {

                // Set the scale at which this layer can be viewed
                // MinScale defines how far 'out' you can zoom where
                // MaxScale defines how far 'in' you can zoom.
                MinScale = 8000,
                MaxScale = 2000
            };

            // Create central point where map is centered
            MapPoint centralPoint = new MapPoint(-355453, 7548720, SpatialReferences.WebMercator);

            // Create starting viewpoint
            Viewpoint startingViewpoint = new Viewpoint(
                centralPoint,
                3000);
            // Set starting viewpoint
            myMap.InitialViewpoint = startingViewpoint;

            // Assign the map to the MapView
            MyMapView.Map = myMap;
        }
    }
}
XAML
<UserControl x:Class="ArcGISRuntime.WPF.Samples.SetMinMaxScale.SetMinMaxScale"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:esri="http://schemas.esri.com/arcgis/runtime/2013"
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
    <Grid>
        <esri:MapView x:Name="MyMapView"/>
    </Grid>
</UserControl>
See Also
Additional Examples
Hyperlink to ExampleDescription
AddFeaturesAdd features to a feature layer.
AddGraphicsRendererA renderer allows you to change the style of all graphics in a graphics overlay by referencing a single symbol style.
AddGraphicsWithSymbolsUse a symbol style to display a graphic on a graphics overlay.
Animate3DGraphicAn `OrbitGeoElementCameraController` follows a graphic while the graphic's position and rotation are animated.
AnimateImageOverlayAnimate a series of images with an image overlay.
BufferListGenerate multiple individual buffers or a single unioned buffer around multiple points.
ChangeViewpointSet the map view to a new viewpoint.
ClipGeometryClip a geometry with another geometry.
ClosestFacilityFind a route to the closest facility from a location.
CreateFeatureCollectionLayerCreate a Feature Collection Layer from a Feature Collection Table, and add it to a map.
CreateGeometriesCreate simple geometry types.
DeleteFeaturesDelete features from an online feature service.
DisplayGridDisplay coordinate system grids including Latitude/Longitude, MGRS, UTM and USNG on a map view. Also, toggle label visibility and change the color of grid lines and grid labels.
DisplayKmlNetworkLinksDisplay a file with a KML network link, including displaying any network link control messages at launch.
DisplayLayerViewStateDetermine if a layer is currently being viewed.
DisplayUtilityAssociationsCreate graphics for utility associations in a utility network.
DisplayWfsDisplay a layer from a WFS service, requesting only features for the current extent.
EditFeatureAttachmentsAdd, delete, and download attachments for features from a service.
FeatureLayerDefinitionExpressionLimit the features displayed on a map with a definition expression.
FeatureLayerDictionaryRendererConvert features into graphics to show them with mil2525d symbols.
FeatureLayerQueryFind features in a feature table which match an SQL query.
FeatureLayerRenderingModeMapRender features statically or dynamically by setting the feature layer rendering mode.
FeatureLayerRenderingModeSceneRender features in a scene statically or dynamically by setting the feature layer rendering mode.
FeatureLayerUrlShow features from an online feature service.
FindRouteDisplay directions for a route between two points.
FormatCoordinatesFormat coordinates in a variety of common notations.
GeodesicOperationsCalculate a geodesic path between two points and measure its distance.
GetElevationAtPointGet the elevation for a given point on a surface in a scene.
IdentifyLayersIdentify features in all layers in a map. MapView supports identifying features across multiple layers. Because some layer types have sublayers, the sample recursively counts results for sublayers within each layer.
LineOfSightGeoElementShow a line of sight between two moving objects.
LineOfSightLocationPerform a line of sight analysis between two points in real time.
ListTransformationsGet a list of suitable transformations for projecting a geometry between two spatial references with different horizontal datums.
MapImageSublayerQueryFind features in a sublayer based on attributes and location.
NavigateRouteUse a routing service to navigate between points.
NavigateRouteReroutingNavigate between two points and dynamically recalculate an alternate route when the original route is unavailable.
ProjectWithSpecificTransformationProject a point from one coordinate system to another using a specific transformation step.
RasterLayerImageServiceRasterCreate a raster layer from a raster image service.
RenderPictureMarkersUse pictures for markers.
RenderSimpleMarkersShow a simple marker symbol on a map.
ServiceFeatureTableManualCacheDisplay a feature layer from a service using the **manual cache** feature request mode.
SetMinMaxScaleRestrict zooming between specific scale ranges.
ShowLabelsOnLayerDisplay custom labels on a feature layer.
SimpleRenderersDisplay common symbols for all graphics in a graphics overlay with a renderer.
SpatialRelationshipsDetermine spatial relationships between two geometries.
SymbolizeShapefileDisplay a shapefile with custom symbology.
UpdateAttributesUpdate feature attributes in an online feature service.
UpdateGeometriesUpdate a feature's location in an online feature service.
ViewshedGeoElementAnalyze the viewshed for an object (GeoElement) in a scene.