davidgalindo / react-native-arcgis-mapview

A basic ArcGIS port for React Native.
MIT License
48 stars 24 forks source link

Android support? #3

Open thanmaic opened 5 years ago

thanmaic commented 5 years ago

Hi, I want to implement esri maps in my react native project, so just wanted to know if this will support android as well for the basic functionality?

thanmaic commented 5 years ago

Can i get a working example of how to use this library? I tried it on Android simulator, it is just blank No error also.

rajashekar545 commented 5 years ago

even am facing similar issue. theres is no error its loading below screen

unnamed

davidgalindo commented 5 years ago

Hey guys! Sorry for the delay. Work has been quite hectic. I'll look into this. I'll get back to you guys soon. Edit: Here's a sample implementation of the map.

        <ArcGISMapView ref={mapView => this.mapView = mapView} style={{width: 360, height: 500}}
          initialMapCenter={[{latitude: 34.055561, longitude: -117.182602}]}
          recenterIfGraphicTapped={true}
          rotationEnabled={false}
          onLayerPress={ this.onLayerPress }
          onRoutingStatusUpdate={this.onRoutingStatusUpdate}
          mapBasemap={ { type: 'normal' } }
          onSingleTap={this.onSingleTap}
      />

Don't forget to set a license key and an initial region. That could be a reason you're getting a grey screen.

thanmaic commented 5 years ago

I have set the initial region as well. Is license key required for dev mode. As mentioned in the read me it says license key is required only for prod rite?

hzbarkan commented 5 years ago

Hey guys! Sorry for the delay. Work has been quite hectic. I'll look into this. I'll get back to you guys soon. Edit: Here's a sample implementation of the map.

        <ArcGISMapView ref={mapView => this.mapView = mapView} style={{width: 360, height: 500}}
          initialMapCenter={[{latitude: 34.055561, longitude: -117.182602}]}
          recenterIfGraphicTapped={true}
          rotationEnabled={false}
          onLayerPress={ this.onLayerPress }
          onRoutingStatusUpdate={this.onRoutingStatusUpdate}
          mapBasemap={ { type: 'normal' } }
          onSingleTap={this.onSingleTap}
      />

Don't forget to set a license key and an initial region. That could be a reason you're getting a grey screen.

How do i use onSingleTap? Can i get the current map point on tap?

JacobSolomonUCF commented 4 years ago

Anyone figure this out yet? iOS works great, but getting the same gray screen on Android. I have an initial region and license key set.

EDIT: Figured it out, my Android emulator did not have network access for some reason

Anujkumar12 commented 4 years ago

@davidgalindo I tried your github react native arcgis code using the below url. https://github.com/davidgalindo/react-native-arcgis-mapview/blob/master/AGSMapView.js

But end up getting this error. Can you look into this?

Screenshot_20191211-123902

Anujkumar12 commented 4 years ago

If someone successfully implemented ArcGIS map functionality using react-native, can you please share the code.

rajashekar545 commented 4 years ago

@Anujkumar12 below is the link for working example. you can download [https://github.com/davidgalindo/react-native-arcgis-mapview/tree/d1590af77357959c5efbe96dcba7b9ccb9dbfc29/Example]

Anujkumar12 commented 4 years ago

@rajashekar545 Thanks rajashekar for your help. I tried what you have mentioned above but still getting the same error. what could be the issue according to you Screenshot_20191211-130753

JacobSolomonUCF commented 4 years ago

Hi @Anujkumar12

I experience a similar issue, I believe this is related to the device's architecture. The Esri Android SDK just recently started supporting 64-bit architectures. In the above error message, it appears your device has arm64-v8a. Try upgrading the SDK to at least 100.5.0. See the references below for further information.

https://developer.android.com/ndk/guides/abis https://community.esri.com/thread/228108-is-the-sdk-ready-for-64-bit-support https://developers.arcgis.com/android/latest/guide/release-notes-100-5.htm

OsamaMukhtar commented 4 years ago

onSingleTap callback doesn't work for me. It just returns a synthetic event object, not the object written in docs. Does anybody know about this?

OGVLFullstack commented 3 years ago

I'm getting this error when trying to start the app:

Could not determine the dependencies of task ':app:mergeDebugAssets'.
> Could not resolve all task dependencies for configuration ':app:debugRuntimeClasspath'.
   > Could not resolve com.esri.arcgisruntime:arcgis-android:100.4.0.
     Required by:
         project :app > project :react-native-arcgis-mapview
      > Could not resolve com.esri.arcgisruntime:arcgis-android:100.4.0.
         > Could not get resource 'https://esri.bintray.com/arcgis/com/esri/arcgisruntime/arcgis-android/100.4.0/arcgis-android-100.4.0.pom'.
            > Could not GET 'https://esri.bintray.com/arcgis/com/esri/arcgisruntime/arcgis-android/100.4.0/arcgis-android-100.4.0.pom'. Received status code 403 from server: Forbidden

Someone knows how to fix it?

RAlanWright commented 3 years ago

HI @OGVLFullstack

I fixed that error by upgrading to at least 100.5.0. I had to change the maven url to https://esri.jfrog.io/artifactory/arcgis'.

I ended up going with the most recent version in my dependencies: implementation 'com.esri.arcgisruntime:arcgis-android:100.10.0' One of those errors required me to change.

giladm commented 3 years ago

@Anujkumar12 below is the link for working example. you can download [https://github.com/davidgalindo/react-native-arcgis-mapview/tree/d1590af77357959c5efbe96dcba7b9ccb9dbfc29/Example]

Works great in RN ver. 0.64.5. It would be useful if a link is placed on the readme page.

LuckyMadu commented 1 year ago

implementation 'com.esri.arcgisruntime:arcgis-android:100.10.0'

@Anujkumar12 Did you find a solution for this? I am facing the same error