Android-Java Point(android.graphics.point) in Point cannot be applied to (Double, Double) -


i using arcgis solution current location of user. whenever want getlongitude , getlatitude gives error point cannot converted double.

how solve problem?

point curlocation; final spatialreference wm = spatialreference.create(102100); final spatialreference egs = spatialreference.create(4326);    public void onlocationchanged(location location) {         if (location == null)             return;          boolean zoomtome = (curlocation == null);         curlocation = new point(location.getlongitude());          if (zoomtome) {             point p = (point) geometryengine.project(curlocation, egs, wm);             mmapview.zoomtoresolution(p, 5.0);         }     } 

it says int tho still :(

a point takes 2 ints parameters. you're passing single double. can use pointf takes 2 floats, lose data.

are using different library (arcgis comes in web search) uses custom point class? if so, make sure you're importing the correct version of point:

import com.esri.core.geometry.point; 

Comments

Popular posts from this blog

c++ - Delete matches in OpenCV (Keypoints and descriptors) -

java - Could not locate OpenAL library -

sorting - opencl Bitonic sort with 64 bits keys -