Skip to content

Commit 5670329

Browse files
authored
Merge pull request #29 from ArcGIS/sample/Render-multilayer-symbols
Render multilayer symbols
2 parents de6ffaa + 45384e1 commit 5670329

File tree

27 files changed

+948
-0
lines changed

27 files changed

+948
-0
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/build
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Render multilayer symbols
2+
3+
Show different kinds of multilayer symbols on a map.
4+
5+
![Image of render multilayer symbols](render-multilayer-symbols.png)
6+
7+
## Use case
8+
9+
Allows you to customize a graphic with a multilayer symbol. For example, you may want more customizable symbols than those that are provided with the API to display a unique representation of a landmark.
10+
11+
## How to use the sample
12+
13+
The sample loads with multilayer symbols displayed for points, polylines, and polygons.
14+
15+
## How it works
16+
17+
1. Create multilayer symbols for each predefined 2D simple symbol style.
18+
* For multilayer point symbols, use the `MultilayerPointSymbol` constructor.
19+
* For multilayer polyline symbols, use the `MultilayerPolylineSymbol` constructor.
20+
* For multilayer polygon symbols, use the `MultilayerPolygonSymbol` constructor.
21+
2. Create `Graphic`s by passing in a `Geometry` and the associated multilayer symbol.
22+
3. Add graphics to the graphics overlay with `graphicsOverlay.getGraphics.add(graphic)`
23+
24+
## Relevant API
25+
26+
* Graphic
27+
* GraphicsOverlay
28+
* MultilayerPointSymbol
29+
* MultilayerPolygonSymbol
30+
* MultilayerPolylineSymbol
31+
* PictureMarkerSymbolLayer
32+
* SolidFillSymbolLayer
33+
* SolidStrokeSymbolLayer
34+
* VectorMarkerSymbolLayer
35+
36+
## Tags
37+
38+
graphic, marker, multilayer, picture, symbol
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
{
2+
"category": "Visualization",
3+
"description": "Show different kinds of multilayer symbols on a map.",
4+
"formal_name": "RenderMultilayerSymbols",
5+
"ignore": false,
6+
"images": [
7+
"render-multilayer-symbols.png"
8+
],
9+
"keywords": [
10+
"graphic",
11+
"marker",
12+
"multilayer",
13+
"picture",
14+
"symbol",
15+
"Graphic",
16+
"GraphicsOverlay",
17+
"MultilayerPointSymbol",
18+
"MultilayerPolygonSymbol",
19+
"MultilayerPolylineSymbol",
20+
"PictureMarkerSymbolLayer",
21+
"SolidFillSymbolLayer",
22+
"SolidStrokeSymbolLayer",
23+
"VectorMarkerSymbolLayer"
24+
],
25+
"language": "kotlin",
26+
"redirect_from": "",
27+
"relevant_apis": [
28+
"Graphic",
29+
"GraphicsOverlay",
30+
"MultilayerPointSymbol",
31+
"MultilayerPolygonSymbol",
32+
"MultilayerPolylineSymbol",
33+
"PictureMarkerSymbolLayer",
34+
"SolidFillSymbolLayer",
35+
"SolidStrokeSymbolLayer",
36+
"VectorMarkerSymbolLayer"
37+
],
38+
"snippets": [
39+
"src/main/java/com/esri/arcgismaps/sample/rendermultilayersymbols/MainActivity.kt"
40+
],
41+
"title": "Render multilayer symbols"
42+
}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
apply plugin: 'com.android.application'
2+
apply plugin: 'org.jetbrains.kotlin.android'
3+
4+
android {
5+
compileSdkVersion rootProject.ext.compileSdkVersion
6+
7+
defaultConfig {
8+
applicationId "com.esri.arcgismaps.sample.rendermultilayersymbols"
9+
minSdkVersion rootProject.ext.minSdkVersion
10+
targetSdkVersion rootProject.ext.targetSdkVersion
11+
versionCode rootProject.ext.versionCode
12+
versionName rootProject.ext.versionName
13+
buildConfigField("String", "API_KEY", API_KEY)
14+
}
15+
16+
buildTypes {
17+
release {
18+
minifyEnabled false
19+
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
20+
}
21+
}
22+
23+
buildFeatures {
24+
dataBinding true
25+
}
26+
}
27+
28+
dependencies {
29+
// lib dependencies from rootProject build.gradle
30+
implementation "androidx.constraintlayout:constraintlayout:$constraintLayoutVersion"
31+
implementation "com.google.android.material:material:$materialVersion"
32+
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Add project specific ProGuard rules here.
2+
# You can control the set of applied configuration files using the
3+
# proguardFiles setting in build.gradle.
4+
#
5+
# For more details, see
6+
# http://developer.android.com/guide/developing/tools/proguard.html
7+
8+
# If your project uses WebView with JS, uncomment the following
9+
# and specify the fully qualified class name to the JavaScript interface
10+
# class:
11+
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12+
# public *;
13+
#}
14+
15+
# Uncomment this to preserve the line number information for
16+
# debugging stack traces.
17+
#-keepattributes SourceFile,LineNumberTable
18+
19+
# If you keep the line number information, uncomment this to
20+
# hide the original source file name.
21+
#-renamesourcefileattribute SourceFile
74.9 KB
Loading
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3+
package="com.esri.arcgismaps.sample.rendermultilayersymbols">
4+
5+
<uses-permission android:name="android.permission.INTERNET" />
6+
7+
<application
8+
android:allowBackup="true"
9+
android:icon="@mipmap/ic_launcher"
10+
android:label="@string/app_name"
11+
android:roundIcon="@mipmap/ic_launcher_round"
12+
android:supportsRtl="true"
13+
android:theme="@style/AppTheme">
14+
<activity
15+
android:exported="true"
16+
android:name=".MainActivity"
17+
android:label="@string/app_name">
18+
<intent-filter>
19+
<action android:name="android.intent.action.MAIN" />
20+
21+
<category android:name="android.intent.category.LAUNCHER" />
22+
</intent-filter>
23+
</activity>
24+
</application>
25+
26+
</manifest>

0 commit comments

Comments
 (0)