insertMapObject Function Android Returning 23 code Cartotype -


firstly, cartotype provides api providing map in android,ios , other platforms per knowledge .

from docs found function meets need

native int com.cartotype.framework.insertmapobject  (   int     amaphandle, int     amapobjecttype, string  alayername, geometry    ageometry, string  astringattributes, int     aintattribute, long    aid, boolean     areplace  )        

but parameters refer couldn't successful in getting , got

// second or continuing measurement, add arrays // , draw line idistancemeasurementx = extendarray( idistancemeasurementx, thispoint[0]); idistancemeasurementy = extendarray( idistancemeasurementy, thispoint[1]);  // _thread.iframework.deletemapobjects(0, // id_measurement_tool, id_measurement_tool, null); // _thread.iframework.addlineorpolygonobject( // "measurementtool", idistancemeasurementx, // idistancemeasurementy, // framework.degree_coords, null, 0, // id_measurement_tool, false);   //drawing line geometry geometry geometry = new geometry(framework.degree_coords); geometry.appendpoint(thispoint[0],thispoint[1]); geometry.begincontour();   try {                                 int abc = _thread.iframework.insertmapobject(0, mapobject.line_type, "measurementtool", geometry, null, 0,                                         id_measurement_tool, false);                                 toast.maketext(getcontext(),abc,toast.length_short).show();                             } catch (exception e) {                                 e.printstacktrace();                             }  //drawing line coordinates // _thread.iframework.insertpointmapobject(0,"measurementtool", idistancemeasurementx[0],idistancemeasurementy[0] ,mapobject.line_type, "", 0, // id_measurement_tool, false); //toast.maketext(getcontext(),"draw line ",toast.length_short).show(); getmapanddraw(); // inefficient, drawing 

those 'abc' int returns value 23 , needs 0,if success according docs.

my need draw line b\w 2 coordinates

any appreciated

thanks @graham

geometry = new geometry(framework.degree_coords);     idistancemeasurementx = extendarray(                                     idistancemeasurementx, thispoint[0]);                             idistancemeasurementy = extendarray(                                     idistancemeasurementy, thispoint[1]); geometry.appendpoint(idistancemeasurementx[idistancemeasurementx.length-1], idistancemeasurementy[idistancemeasurementy.length-1]);                              //drawing line geometry                                  _thread.iframework.insertmapobject(0, mapobject.line_type, "measurementtool", geometry, null, 0,                                         0, false); 

Comments

Popular posts from this blog

javascript - Clear button on addentry page doesn't work -

c# - Selenium Authentication Popup preventing driver close or quit -

tensorflow when input_data MNIST_data , zlib.error: Error -3 while decompressing: invalid block type -