Skip to content

Commit 4ce298a

Browse files
authored
Merge pull request #175616 from stevemunk/SM-iOS-Preview-TwoArticles
iOS getting started and quickstart
2 parents 1fc0689 + f09b608 commit 4ce298a

15 files changed

+355
-80
lines changed

.openpublishing.redirection.json

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6678,11 +6678,6 @@
66786678
"redirect_url": "/azure/developer/mobile-apps/azure-maps",
66796679
"redirect_document_id": false
66806680
},
6681-
{
6682-
"source_path_from_root": "/articles/azure-maps/quick-ios-app.md",
6683-
"redirect_url": "/azure/azure-maps/quick-demo-map-app",
6684-
"redirect_document_id": false
6685-
},
66866681
{
66876682
"source_path_from_root": "/articles/azure-maps/how-to-request-real-time-data.md",
66886683
"redirect_url": "/azure/azure-maps",

articles/azure-maps/how-to-use-android-map-control-library.md

Lines changed: 74 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
---
22
title: Getting started with Android map control | Microsoft Azure Maps
33
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
66
ms.date: 2/26/2021
77
ms.topic: how-to
88
ms.service: azure-maps
99
services: azure-maps
10-
manager: cpendle
10+
manager: eriklind
1111
zone_pivot_groups: azure-maps-android
1212
---
1313

@@ -17,122 +17,121 @@ The Azure Maps Android SDK is a vector map library for Android. This article gui
1717

1818
## Prerequisites
1919

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.
2121

2222
## Localizing the map
2323

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".
2525

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.
33-
AzureMaps.setAadProperties("<Your aad clientId>", "<Your aad AppId>", "<Your aad Tenant>");
34-
35-
//Set your Azure Maps Key.
36-
//AzureMaps.setSubscriptionKey("<Your Azure Maps Key>");
37-
38-
//Set the language to be used by Azure Maps.
39-
AzureMaps.setLanguage("fr-FR");
40-
41-
//Set the regional view to be used by Azure Maps.
42-
AzureMaps.setView("Auto");
43-
}
44-
```
45-
46-
::: zone-end
47-
48-
::: zone pivot="programming-language-kotlin"
49-
50-
```kotlin
51-
companion object {
52-
init {
26+
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 {
5332
//Alternatively use Azure Active Directory authenticate.
5433
AzureMaps.setAadProperties("<Your aad clientId>", "<Your aad AppId>", "<Your aad Tenant>");
55-
34+
5635
//Set your Azure Maps Key.
57-
//AzureMaps.setSubscriptionKey("<Your Azure Maps Key>");
36+
//AzureMaps.setSubscriptionKey("<Your Azure Maps Key>");
5837

5938
//Set the language to be used by Azure Maps.
6039
AzureMaps.setLanguage("fr-FR");
6140

6241
//Set the regional view to be used by Azure Maps.
6342
AzureMaps.setView("Auto");
6443
}
65-
}
66-
```
67-
68-
::: zone-end
69-
70-
The second option is to pass the language and view information into the map control XML.
44+
```
45+
46+
::: zone-end
47+
48+
::: zone pivot="programming-language-kotlin"
49+
50+
```kotlin
51+
companion object {
52+
init {
53+
//Alternatively use Azure Active Directory authenticate.
54+
AzureMaps.setAadProperties("<Your aad clientId>", "<Your aad AppId>", "<Your aad Tenant>");
55+
56+
//Set your Azure Maps Key.
57+
//AzureMaps.setSubscriptionKey("<Your Azure Maps Key>");
58+
59+
//Set the language to be used by Azure Maps.
60+
AzureMaps.setLanguage("fr-FR");
61+
62+
//Set the regional view to be used by Azure Maps.
63+
AzureMaps.setView("Auto");
64+
}
65+
}
66+
```
67+
68+
::: zone-end
7169

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-
```
70+
1. You can also pass the language and regional view information to the map control XML.
8171

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. The final 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.
8382

84-
::: zone pivot="programming-language-java-android"
83+
::: zone pivot="programming-language-java-android"
8584

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+
```
9493

95-
::: zone-end
94+
::: zone-end
9695

97-
::: zone pivot="programming-language-kotlin"
96+
::: zone pivot="programming-language-kotlin"
9897

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+
```
107106

108-
::: zone-end
107+
::: zone-end
109108

110109
Here is an example of Azure Maps with the language set to "fr-FR" and regional view set to "Auto".
111110

112111
![Azure Maps, map image showing labels in French](media/how-to-use-android-map-control-library/android-localization.png)
113112

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 Azure Maps](supported-languages.md).
115114

116115
## Navigating the map
117116

118117
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.
119118

120-
**Zoom the map**
119+
### Zoom the map
121120

122121
* Touch the map with two fingers and pinch together to zoom out or spread the fingers apart to zoom in.
123122
* Double tap the map to zoom in one level.
124123
* Double tap with two fingers to zoom out the map one level.
125124
* Tap twice; on second tap, hold your finger on the map and drag up to zoom in, or down to zoom out.
126125

127-
**Pan the map**
126+
### Pan the map
128127

129128
* Touch the map and drag in any direction.
130129

131-
**Rotate the map**
130+
### Rotate the map
132131

133132
* Touch the map with two fingers and rotate.
134133

135-
**Pitch the map**
134+
### Pitch the map
136135

137136
* Touch the map with two fingers and drag them up or down together.
138137

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
---
2+
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.
29+
AzureMaps.configure(aadClient: "<Your aad clientId>", aadAppId: "<Your aad AppId>", aadTenant: "<Your aad Tenant>")
30+
31+
// Set your Azure Maps Key.
32+
// AzureMaps.configure(subscriptionKey: "<Your Azure Maps Key>")
33+
34+
// Set the language to be used by Azure Maps.
35+
AzureMaps.language = "fr-FR"
36+
37+
// 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 in any 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.

articles/azure-maps/index.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ metadata:
1212
ms.author: v-munksteve
1313
ms.date: 10/13/2021
1414

15+
1516
# linkListType: architecture | concept | deploy | download | get-started | how-to-guide | learn | overview | quickstart | reference | tutorial | video | whats-new
1617

1718
landingContent:
@@ -44,6 +45,8 @@ landingContent:
4445
url: quick-demo-map-app.md
4546
- text: Create an Android app using Azure Maps
4647
url: quick-android-map.md
48+
- text: Create an iOS app using Azure Maps
49+
url: quick-iOS-app.md
4750
- linkListType: concept
4851
links:
4952
- text: Choose the right pricing tier for Maps account
@@ -164,6 +167,18 @@ landingContent:
164167
- text: Use data-driven style expressions
165168
url: data-driven-style-expressions-android-sdk.md
166169

170+
# Card
171+
- title: Developing with iOS SDK
172+
linkLists:
173+
- linkListType: quickstart
174+
links:
175+
- text: Create an iOS app using Azure Maps
176+
url: quick-iOS-app.md
177+
- linkListType: how-to-guide
178+
links:
179+
- text: Getting started with the iOS map control
180+
url: how-to-use-ios-map-control-library.md
181+
167182
# Card
168183
- title: Developing with Location-Based Services
169184
linkLists:
683 KB
Loading
245 KB
Loading
167 KB
Loading
318 KB
Loading
68.7 KB
Loading
133 KB
Loading

0 commit comments

Comments
 (0)