You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/azure-maps/how-to-use-android-map-control-library.md
+74-75Lines changed: 74 additions & 75 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,13 +1,13 @@
1
1
---
2
2
title: Getting started with Android map control | Microsoft Azure Maps
3
3
description: Become familiar with the Azure Maps Android SDK. See how to create a project in Android Studio, install the SDK, and create an interactive map.
4
-
author: anastasia-ms
5
-
ms.author: v-stharr
4
+
author: stevemunk
5
+
ms.author: v-munksteve
6
6
ms.date: 2/26/2021
7
7
ms.topic: how-to
8
8
ms.service: azure-maps
9
9
services: azure-maps
10
-
manager: cpendle
10
+
manager: eriklind
11
11
zone_pivot_groups: azure-maps-android
12
12
---
13
13
@@ -17,122 +17,121 @@ The Azure Maps Android SDK is a vector map library for Android. This article gui
17
17
18
18
## Prerequisites
19
19
20
-
Be sure to complete the steps in the [Quickstart: Create an Android app](quick-android-map.md)document.
20
+
Be sure to complete the steps in the [Quickstart: Create an Android app](quick-android-map.md)article.
21
21
22
22
## Localizing the map
23
23
24
-
The Azure Maps Android SDK provides three different ways of setting the language and regional view of the map. The following code shows how to set the language to French ("fr-FR") and the regional view to "Auto".
24
+
The Azure Maps Android SDK provides three ways to set the language and regional view of the map. The following code shows how to set the language to French ("fr-FR") and the regional view to "Auto".
25
25
26
-
The first option is to pass the language and view regional information into the `AzureMaps` class using the static `setLanguage` and `setView` methods globally. This code will set the default language and regional view across all Azure Maps controls loaded in your app.
27
-
28
-
::: zone pivot="programming-language-java-android"
29
-
30
-
```java
31
-
static {
32
-
//Alternatively use Azure Active Directory authenticate.
1. Pass the language and regional view information into the `AzureMaps` class using the static `setLanguage` and `setView` properties. This will set the default language and regional view properties in your app.
27
+
28
+
::: zone pivot="programming-language-java-android"
29
+
30
+
```java
31
+
static {
53
32
//Alternatively use Azure Active Directory authenticate.
1.You can also pass the language and regional view information to the map control XML.
81
71
82
-
The third option is to programmatically set the language and regional view of the map using the maps `setStyle` method. This method of changing the language and regional view of the map can be done at any time.
72
+
```XML
73
+
<com.azure.android.maps.control.MapControl
74
+
android:id="@+id/myMap"
75
+
android:layout_width="match_parent"
76
+
android:layout_height="match_parent"
77
+
app:azure_maps_language="fr-FR"
78
+
app:azure_maps_view="Auto"
79
+
/>
80
+
```
81
+
1.Thefinal way of programmatically setting the language and regional view properties uses the maps `setStyle` method. This can be done at any time to change the language and regional view of the map.
83
82
84
-
::: zone pivot="programming-language-java-android"
83
+
::: zone pivot="programming-language-java-android"
85
84
86
-
```java
87
-
mapControl.onReady(map -> {
88
-
map.setStyle(
89
-
language("fr-FR"),
90
-
view("Auto")
91
-
);
92
-
});
93
-
```
85
+
```java
86
+
mapControl.onReady(map -> {
87
+
map.setStyle(
88
+
language("fr-FR"),
89
+
view("Auto")
90
+
);
91
+
});
92
+
```
94
93
95
-
::: zone-end
94
+
::: zone-end
96
95
97
-
::: zone pivot="programming-language-kotlin"
96
+
::: zone pivot="programming-language-kotlin"
98
97
99
-
```kotlin
100
-
mapControl.onReady(OnReady { map:AzureMap->
101
-
map.setStyle(
102
-
language("fr-FR"),
103
-
view("Auto")
104
-
)
105
-
})
106
-
```
98
+
```kotlin
99
+
mapControl.onReady(OnReady { map:AzureMap->
100
+
map.setStyle(
101
+
language("fr-FR"),
102
+
view("Auto")
103
+
)
104
+
})
105
+
```
107
106
108
-
::: zone-end
107
+
::: zone-end
109
108
110
109
Here is an example of AzureMaps with the language set to "fr-FR" and regional view set to "Auto".
111
110
112
111

113
112
114
-
A complete list of supported languages and regional views is documented [here](supported-languages.md).
113
+
For a complete list of supported languages and regional views see [Localization support in AzureMaps](supported-languages.md).
115
114
116
115
## Navigating the map
117
116
118
117
There are several different ways in which the map can be zoomed, panned, rotated, and pitched. The following details all the different ways to navigate the map.
119
118
120
-
**Zoom the map**
119
+
### Zoom the map
121
120
122
121
*Touch the map with two fingers and pinch together to zoom out or spread the fingers apart to zoom in.
123
122
*Double tap the map to zoom in one level.
124
123
*Double tap with two fingers to zoom out the map one level.
125
124
*Tap twice; on second tap, hold your finger on the map and drag up to zoom in, or down to zoom out.
126
125
127
-
**Pan the map**
126
+
### Pan the map
128
127
129
128
*Touch the map and drag in any direction.
130
129
131
-
**Rotate the map**
130
+
### Rotate the map
132
131
133
132
*Touch the map with two fingers and rotate.
134
133
135
-
**Pitch the map**
134
+
### Pitch the map
136
135
137
136
*Touch the map with two fingers and drag them up or down together.
title: Getting started with iOS map control | Microsoft Azure Maps
3
+
description: Become familiar with the Azure Maps iOS SDK. See how to install the SDK and create an interactive map.
4
+
author: stevemunk
5
+
ms.author: v-munksteve
6
+
ms.date: 10/08/2021
7
+
ms.topic: how-to
8
+
ms.service: azure-maps
9
+
services: azure-maps
10
+
manager: eriklind
11
+
---
12
+
13
+
# Getting started with Azure Maps iOS SDK
14
+
15
+
The Azure Maps iOS SDK is a vector map library for iOS. This article guides you through the processes of installing the Azure Maps iOS SDK and loading a map.
16
+
17
+
## Prerequisites
18
+
19
+
Be sure to complete the steps in the [Quickstart: Create an iOS app](quick-ios-app.md) article.
20
+
21
+
## Localizing the map
22
+
23
+
The Azure Maps iOS SDK provides three ways of setting the language and regional view of the map. The following code demonstrates the different ways of setting the *language* to French ("fr-FR") and the *regional view* to "Auto".
24
+
25
+
1. Pass the language and regional view information into the `AzureMaps` class using the static `language` and `view` properties. This sets the default language and regional view properties in your app.
26
+
27
+
```swift
28
+
// Alternatively use Azure Active Directory authenticate.
// Set the regional view to be used by Azure Maps.
38
+
AzureMaps.view="Auto"
39
+
```
40
+
41
+
1. You can also pass the language and regional view information to the map control init.
42
+
43
+
```swift
44
+
MapControl(options: [
45
+
StyleOptions.language("fr-FR"),
46
+
StyleOptions.view("Auto")
47
+
])
48
+
```
49
+
50
+
1. The final way of programmatically setting the language and regional view properties uses the maps `setStyle` method. Do this any time you need to change the language and regional view of the map.
51
+
52
+
```swift
53
+
mapControl.getMapAsync { map in
54
+
map.setStyle([
55
+
StyleOptions.language("fr-FR"),
56
+
StyleOptions.view("Auto")
57
+
])
58
+
}
59
+
```
60
+
61
+
Here is an example of an Azure Maps application with the language set to "fr-FR" and regional view set to "Auto".
62
+
63
+
:::image type="content" source="media/ios-sdk/how-to-use-ios-map-control-library/fr-borderless.png" alt-text="A map image showing labels in French.":::
64
+
65
+
For a complete list of supported languages and regional views, see [Localization support in Azure Maps](supported-languages.md).
66
+
67
+
## Navigating the map
68
+
69
+
This section details the various ways to navigate when in an Azure Maps program.
70
+
71
+
### Zoom the map
72
+
73
+
* Touch the map with two fingers and pinch together to zoom out or spread the fingers apart to zoom in.
74
+
*Double tap the map to zoom in one level.
75
+
*Double tap with two fingers to zoom out the map one level.
76
+
* Tap twice; on second tap, hold your finger on the map and drag up to zoom in, or down to zoom out.
77
+
78
+
### Pan the map
79
+
80
+
* Touch the map and drag inany direction.
81
+
82
+
### Rotate the map
83
+
84
+
* Touch the map with two fingers and rotate.
85
+
86
+
### Pitch the map
87
+
88
+
* Touch the map with two fingers and drag them up or down together.
89
+
90
+
## Azure Government cloud support
91
+
92
+
The Azure Maps iOS SDK supports using the Azure Government cloud. You specify using the Azure Maps government cloud domain by adding the following line of code where the Azure Maps authentication details are specified:
93
+
94
+
```
95
+
AzureMaps.domain = "atlas.azure.us"
96
+
```
97
+
98
+
Be sure to use Azure Maps authentication details from the Azure Government cloud platform when authenticating the map and services.
0 commit comments