Skip to content
This repository has been archived by the owner on Jan 26, 2023. It is now read-only.

Commit

Permalink
100.12 (#913)
Browse files Browse the repository at this point in the history
* add artifactory

* remove progress indicator on failed trace, trace utility netowrk

* 100.11.2

* update gradle or kotlin version

* Browse OGC API feature service (#886)

* add sample, screenshot and README

* fix build.gradle

* pull from v.next

* small fixes

* PR fixes

* update gradle

* update gradle to 6.7.1

* version updates

* Update README.md

* Trev8939/update locators (#892)

* find address and find place done

* update offline geocode

* move samples back to kotlin extensions until workaround is found (#894)

* move samples back to kotlin extensions until workaround is found

* add missing copyright

* unify arcgis vector tiled layer custom style naming

* Shu11698/v.next fixes (#895)

* Fixed Add stop and barriers text

* ListView is visible, made some minor UI improvements

Increased text size and centered layout for readability.

Co-authored-by: Shubham Sharma <shubhamsharma@esri.com>

* Use defaultTraceConfiguration instead of traceConfiguration (#898)

* use defaultTraceConfiguration instead of traceConfiguration

* Update README.md

* Removed artifact link (#900)

* reanble buttons in trace utility network after error

* Update build.gradle

* New Sample: Query with CQL filters (#899)

* working update with screenshots, READMEs and metadata updated (#904)

* add intent flags and URI handling (#906)

* Create save map no folder crash fix (#905)

* check for no folder selected from server, is user has no folders

* invert if

* add option to save to no folder

* Patches to CQL Filters (#909)

* Open map url update (#910)

* Fixed incorrect image file name (#911)

* target 100.12

* New sample: setup-location-driven-geotriggers (#907)

* working prototype

* rename and add scrollview

* Added garden section and POI interactions

* Cleaning up code!

* Attached dialog to listView

* Create README.md

* Comments and reformatting code

* more comments and reformatting

* Add files via upload

* Update README.md

* Create README.metadata.json

* Update README.metadata.json

* Added copyright

* Update README.md

* Layered mapview and reduced POIs size

* Resolved PR comments

* Image attachments are now retrieved on click.

* Log statements for list items. Not fixed yet.

* Fixed wrap_content issue.

* Resolving comments

* Revert to KotlinX

* small fixes to metadata and readme to fix sample viewer

Co-authored-by: trev8939 <tdraeseke@esri.com>

* CQL Filters patch (#912)

* Query with CQL sample progress

* Added comments

* Code cleanup

* Added zoom using setViewpointGeometryAsync

* Create README.md

* Add files via upload

* Create README.metadata.json

* Delete QueryWithCQLFilters.png

* Add files via upload

* Update README.md

* Update README.metadata.json

* Changed package name

* Update AndroidManifest.xml

* Added copyright

* Convert to viewbinding

* Code cleanup

* Update MainActivity.kt

* Update README.metadata.json

* Resolved PR comments

* Removed unwanted line

* Updated snipped directory name

* Set alert dialog to show "Empty Query" option

* Changed to "No Query"

* Update MainActivity.kt

* Delete query-with-cql-features.png

* Add files via upload

* Update README.md

* Removed viewbinding

* Update README.md

Co-authored-by: Shubham Sharma <shubhamsharma@esri.com>
Co-authored-by: Shubham Sharma <shubham71098@gmail.com>
  • Loading branch information
3 people committed Aug 25, 2021
1 parent 8d7a5cd commit a7c8dd3
Show file tree
Hide file tree
Showing 89 changed files with 2,647 additions and 179 deletions.
7 changes: 6 additions & 1 deletion java/add-graphics-renderer/README.md
Expand Up @@ -23,9 +23,14 @@ Run the sample and view graphics for points, lines, and polygons, which are styl

## Relevant API

* CubicBezierSegment
* EllipticArcSegment
* Geometry
* Graphic
* GraphicsOverlay
* MutablePart
* PolygonBuilder
* PolylineBuilder
* SimpleFillSymbol
* SimpleLineSymbol
* SimpleMarkerSymbol
Expand All @@ -37,4 +42,4 @@ To set unique symbols across a number of graphics (e.g. showing graphics of indi

## Tags

display, graphics, marker, overlay, renderer, symbol
arc, bezier, curve, display, graphics, marker, overlay, renderer, segment, symbol, true curve
24 changes: 23 additions & 1 deletion java/add-graphics-renderer/README.metadata.json
Expand Up @@ -7,21 +7,43 @@
"add-graphics-renderer.png"
],
"keywords": [
"arc",
"bezier",
"curve",
"display",
"graphics",
"marker",
"overlay",
"renderer",
"symbol"
"segment",
"symbol",
"true curve",
"CubicBezierSegment",
"EllipticArcSegment",
"Geometry",
"Graphic",
"GraphicsOverlay",
"MutablePart",
"PolygonBuilder",
"PolylineBuilder",
"SimpleFillSymbol",
"SimpleLineSymbol",
"SimpleMarkerSymbol",
"SimpleRenderer"
],
"language": "java",
"redirect_from": [
"/android/latest/sample-code/add-graphics-renderer.htm"
],
"relevant_apis": [
"CubicBezierSegment",
"EllipticArcSegment",
"Geometry",
"Graphic",
"GraphicsOverlay",
"MutablePart",
"PolygonBuilder",
"PolylineBuilder",
"SimpleFillSymbol",
"SimpleLineSymbol",
"SimpleMarkerSymbol",
Expand Down
Binary file modified java/add-graphics-renderer/add-graphics-renderer.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Expand Up @@ -20,10 +20,17 @@
import android.os.Bundle;

import androidx.appcompat.app.AppCompatActivity;

import com.esri.arcgisruntime.ArcGISRuntimeEnvironment;
import com.esri.arcgisruntime.geometry.CubicBezierSegment;
import com.esri.arcgisruntime.geometry.EllipticArcSegment;
import com.esri.arcgisruntime.geometry.Geometry;
import com.esri.arcgisruntime.geometry.Part;
import com.esri.arcgisruntime.geometry.Point;
import com.esri.arcgisruntime.geometry.Polygon;
import com.esri.arcgisruntime.geometry.PolygonBuilder;
import com.esri.arcgisruntime.geometry.PolylineBuilder;
import com.esri.arcgisruntime.geometry.SpatialReference;
import com.esri.arcgisruntime.geometry.SpatialReferences;
import com.esri.arcgisruntime.mapping.ArcGISMap;
import com.esri.arcgisruntime.mapping.BasemapStyle;
Expand Down Expand Up @@ -64,7 +71,8 @@ private void addGraphicsOverlay() {
// point graphic
Point pointGeometry = new Point(40e5, 40e5, SpatialReferences.getWebMercator());
// red diamond point symbol
SimpleMarkerSymbol pointSymbol = new SimpleMarkerSymbol(SimpleMarkerSymbol.Style.DIAMOND, Color.RED, 10);
SimpleMarkerSymbol pointSymbol = new SimpleMarkerSymbol(SimpleMarkerSymbol.Style.DIAMOND,
Color.RED, 10);
// create graphic for point
Graphic pointGraphic = new Graphic(pointGeometry);
// create a graphic overlay for the point
Expand Down Expand Up @@ -96,14 +104,15 @@ private void addGraphicsOverlay() {
// add graphics overlay to the MapView
mMapView.getGraphicsOverlays().add(lineGraphicOverlay);

//polygon graphic
// polygon graphic
PolygonBuilder polygonGeometry = new PolygonBuilder(SpatialReferences.getWebMercator());
polygonGeometry.addPoint(-20e5, 20e5);
polygonGeometry.addPoint(20e5, 20e5);
polygonGeometry.addPoint(20e5, -20e5);
polygonGeometry.addPoint(-20e5, -20e5);
// solid yellow polygon symbol
SimpleFillSymbol polygonSymbol = new SimpleFillSymbol(SimpleFillSymbol.Style.SOLID, Color.YELLOW, null);
SimpleFillSymbol polygonSymbol = new SimpleFillSymbol(SimpleFillSymbol.Style.SOLID,
Color.YELLOW, null);
// create graphic for polygon
Graphic polygonGraphic = new Graphic(polygonGeometry.toGeometry());
// create graphic overlay for polygon
Expand All @@ -117,6 +126,104 @@ private void addGraphicsOverlay() {
// add graphics overlay to MapView
mMapView.getGraphicsOverlays().add(polygonGraphicOverlay);

// curved polygon graphic
// create a point for the center of the geometry
Point originPoint = new Point(40e5, 5e5, SpatialReferences.getWebMercator());
// create polygon
Geometry curvedPolygonGeometry = makeHeartGeometry(originPoint, 10e5);
// create graphic for polygon
Graphic curvedPolygonGraphic = new Graphic(curvedPolygonGeometry);
// create a simple fill symbol with outline
SimpleLineSymbol curvedLineSymbol = new SimpleLineSymbol(SimpleLineSymbol.Style.SOLID,
Color.BLACK, 1f);
SimpleFillSymbol curvedFillSymbol = new SimpleFillSymbol(SimpleFillSymbol.Style.SOLID,
Color.RED, curvedLineSymbol);
// create simple renderer
SimpleRenderer curvedPolygonRenderer = new SimpleRenderer(curvedFillSymbol);

// create graphic overlay for polygon and add it to the map view
GraphicsOverlay curvedPolygonGraphicsOverlay = new GraphicsOverlay();
// add graphic to overlay
curvedPolygonGraphicsOverlay.getGraphics().add(curvedPolygonGraphic);
// set the renderer on the graphics overlay to the new renderer
curvedPolygonGraphicsOverlay.setRenderer(curvedPolygonRenderer);
// add graphics overlay to MapView
mMapView.getGraphicsOverlays().add(curvedPolygonGraphicsOverlay);
}

/**
* Create a heart-shape geometry with Bezier and elliptic arc segments from a given point and
* side length.
*
* @param center of the heart shape
* @param sideLength of the heart shape
*
* @return a heart shaped {@link Geometry}
*/
private static Geometry makeHeartGeometry(Point center, double sideLength) {
SpatialReference spatialReference = center.getSpatialReference();
// the x and y coordinates to simplify the calculation
double minX = center.getX() - 0.5 * sideLength;
double minY = center.getY() - 0.5 * sideLength;
// the radius of the arcs
double arcRadius = sideLength * 0.25;

// bottom left curve
Point leftCurveStart = new Point(center.getX(), minY, spatialReference);
Point leftCurveEnd = new Point(minX, minY + 0.75 * sideLength, spatialReference);
Point leftControlPoint1 = new Point(center.getX(), minY + 0.25 * sideLength, spatialReference);
Point leftControlPoint2 = new Point(minX, center.getY(), spatialReference);
CubicBezierSegment leftCurve = new CubicBezierSegment(
leftCurveStart,
leftControlPoint1,
leftControlPoint2,
leftCurveEnd,
spatialReference
);

// top left arc
Point leftArcCenter =
new Point(minX + 0.25 * sideLength, minY + 0.75 * sideLength, spatialReference);
EllipticArcSegment leftArc = EllipticArcSegment.createCircularEllipticArc(
leftArcCenter,
arcRadius,
Math.PI,
-Math.PI,
spatialReference
);

// top right arc
Point rightArcCenter =
new Point(minX + 0.75 * sideLength, minY + 0.75 * sideLength, spatialReference);
EllipticArcSegment rightArc = EllipticArcSegment.createCircularEllipticArc(
rightArcCenter,
arcRadius,
Math.PI,
-Math.PI,
spatialReference
);

// bottom right curve
Point rightCurveStart = new Point(minX + sideLength, minY + 0.75 * sideLength,
spatialReference);
Point rightCurveEnd = leftCurveStart;
Point rightControlPoint1 = new Point(minX + sideLength, center.getY(), spatialReference);
Point rightControlPoint2 = leftControlPoint1;
CubicBezierSegment rightCurve = new CubicBezierSegment(
rightCurveStart,
rightControlPoint1,
rightControlPoint2,
rightCurveEnd,
spatialReference
);

Part heart = new Part(spatialReference);
heart.add(leftCurve);
heart.add(leftArc);
heart.add(rightArc);
heart.add(rightCurve);

return new Polygon(heart, spatialReference);
}

@Override
Expand Down
17 changes: 7 additions & 10 deletions java/add-graphics-renderer/src/main/res/layout/activity_main.xml
@@ -1,15 +1,12 @@
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent"
android:layout_height="match_parent" android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:paddingBottom="@dimen/activity_vertical_margin" tools:context=".MainActivity">
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">

<!-- MapView -->
<com.esri.arcgisruntime.mapping.view.MapView
android:id="@+id/mapView"
android:layout_width="match_parent"
android:layout_height="match_parent">
</com.esri.arcgisruntime.mapping.view.MapView>
android:id="@+id/mapView"
android:layout_width="match_parent"
android:layout_height="match_parent" />

</RelativeLayout>

This file was deleted.

5 changes: 0 additions & 5 deletions java/add-graphics-renderer/src/main/res/values/dimens.xml

This file was deleted.

Expand Up @@ -241,6 +241,7 @@ private void showSaveMapDialog() {
mPortalFolders = portalUserContent.getFolders();
// get a list of the user's portal folder titles
List<String> portalFolderTitles = new ArrayList<>();
portalFolderTitles.add("No Folder");
for (PortalFolder portalFolder : mPortalFolders) {
portalFolderTitles.add(portalFolder.getTitle());
}
Expand Down Expand Up @@ -271,9 +272,17 @@ private void showSaveMapDialog() {
Iterable<String> tags = Arrays.asList(tagsEditText.getText().toString().split(","));
// make sure the title edit text view has text
if (titleEditText.getText().length() > 0) {
// call save map passing in title, tags, description and portal
saveMap(titleEditText.getText().toString(), tags, descriptionEditText.getText().toString(),
mPortalFolders.get(mFolderSpinner.getSelectedItemPosition()));
// check if a folder was selected
if (mFolderSpinner.getSelectedItemPosition() <= 0) {
// if no folder was selected, just pass null for portalFolder argument
saveMap(titleEditText.getText().toString(), tags,
descriptionEditText.getText().toString(), null);
} else {
// call save map passing in title, tags, description and portal
saveMap(titleEditText.getText().toString(), tags,
descriptionEditText.getText().toString(),
mPortalFolders.get(mFolderSpinner.getSelectedItemPosition() - 1));
}
saveMapDialog.dismiss();
} else {
Toast.makeText(this, "A title is required to save your map.", Toast.LENGTH_LONG).show();
Expand Down
34 changes: 22 additions & 12 deletions java/edit-feature-attachments/src/main/AndroidManifest.xml
@@ -1,32 +1,42 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.esri.arcgisruntime.sample.editfeatureattachments">
package="com.esri.arcgisruntime.sample.editfeatureattachments">

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

<uses-feature
android:glEsVersion="0x00020000"
android:required="true" />
android:glEsVersion="0x00020000"
android:required="true" />

<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme">
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<provider
android:name="androidx.core.content.FileProvider"
android:authorities="${applicationId}.provider"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/provider_paths" />
</provider>

<activity
android:name=".MainActivity"
android:label="@string/app_name">
android:name=".MainActivity"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".EditAttachmentActivity"
android:label="@string/edit_attachments" />
android:name=".EditAttachmentActivity"
android:label="@string/edit_attachments" />
</application>

</manifest>
Expand Up @@ -30,6 +30,7 @@

import androidx.appcompat.app.AlertDialog;
import androidx.appcompat.app.AppCompatActivity;
import androidx.core.content.FileProvider;

import com.esri.arcgisruntime.concurrent.ListenableFuture;
import com.esri.arcgisruntime.data.ArcGISFeature;
Expand Down Expand Up @@ -158,8 +159,11 @@ private void fetchAttachmentAsync(final int position) {
}
// open the file in gallery
Intent i = new Intent();
i.setFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
i.setAction(Intent.ACTION_VIEW);
i.setDataAndType(Uri.fromFile(file), "image/png");
Uri contentUri = FileProvider
.getUriForFile(getApplicationContext(), getApplicationContext().getPackageName() + ".provider", file);
i.setDataAndType(contentUri, "image/png");
startActivity(i);

} catch (Exception e) {
Expand Down
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<paths>
<external-path name="external_files" path="."/>
</paths>
8 changes: 6 additions & 2 deletions java/open-existing-map/README.md
Expand Up @@ -6,7 +6,7 @@ Display a web map.

## Use case

For displaying web maps stored on ArcGISOnline (e.g. soil survey results, as demonstrated in this sample).
For displaying web maps stored on ArcGIS Online (e.g. soil survey results, as demonstrated in this sample).

## How to use the sample

Expand All @@ -26,10 +26,14 @@ A web map can be selected from the navigation menu. On selection the web map dis
* Portal
* PortalItem

## About the data

The web maps accessed by this sample show [Geology for United States](https://arcgis.com/apps/mapviewer/index.html?webmap=92ad152b9da94dee89b9e387dfe21acd#), [Terrestrial Ecosystems of the World](https://arcgis.com/home/item.html?id=5be0bc3ee36c4e058f7b3cebc21c74e6) and [Recent Hurricanes, Cyclones and Typhoons](https://arcgis.com/home/item.html?id=064f2e898b094a17b84e4a4cd5e5f549).

## Additional information

Mobile map packages can also include address locators and geometric networks. For an example of this, see the "Mobile Map Search and Route Sample".

## Tags

portal item, web map
portal item, web map
Binary file modified java/open-existing-map/open-existing-map.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit a7c8dd3

Please sign in to comment.