0

I have multiple buffer geometries for instance

var firstVar={"geometries":[{"rings":[[[8527798.953692015,3371033.664249272],[8528080.67360234,3371029.6951561933],[8528362.169878159,3371017.7910276973],[8528643.219062481,3370997.9613135024],[8528923.598053237,3370970.2217548057],[8529203.084280364,3370934.594371784],[8529481.45588249,3370891.1074461183],[8529758.491883054,3370839.795498539],[8530033.972365728,3370780.6992614265],[8530307.67864897,3370713.865646472],[8530579.393459639,3370639.3477074453],[8530848.90110546,3370557.204598072],[8531115.987646248,3370467.501525082],[8531380.441063736,3370370.309696445],[8531642.051429873,3370265.7062648432],[8531900.611073485,3370153.7742664283],[8532155.914745113,3370034.602554904],[8532407.759779949,3369908.285730994],[8532655.946258714,3369774.9240673436],[8532900.277166365,3369634.623428925],[8533140.558548477,3369487.495188996],[8533376.599665215,3369333.656140693],[8533608.213142747,3369173.228404316],[8533835.215121984,3369006.3393303887],[8534057.42540453,3368833.121398565],[8534274.667595724,3368653.712112463],[8534486.769244669,3368468.253890515],[8534693.561981132,3368276.893952909],[8534894.881649185,3368079.784204726],[8535090.568437532,3367877.0811153543],[8535280.467006354,3367668.9455942786],[8535464.426610632,3367455.5428633504],[8535642.30121981,3367237.042325631],[8535813.94963371,3367013.6174309133],[8535979.235594627,3366785.4455380393],[8536138.027895488,3366552.707774104],[8536290.200484008,3366315.5888906782],[8536435.632562753,3366074.2771171452],[8536574.208685031,3365828.9640112827],[8536705.81884654,3365579.844307201],[8536830.35857268,3365327.1157607585],[8536947.729001502,3365070.978992581],[8537057.836962169,3364811.6373288026],[8537160.595048938,3364549.2966396636],[8537255.921690522,3364284.165176087],[8537343.74121486,3364016.4534043646],[8537423.98390918,3363746.3738390836],[8537496.586075338,3363474.1408744315],[8537561.490080379,3363199.970614003],[8537618.6444023,3362924.0806992548],[8537668.003670933,3362646.6901367367],[8537709.528703973,3362368.0191242415],[8537743.186538076,3362088.288876007],[8537768.950455027,3361807.721447111],[8537786.80000295,3361526.539557202],[8537796.721012538,3361244.9664136977],[8537798.705608312,3360963.225534602],[8537792.752214862,3360681.5405710693],[8537778.865558103,3360400.1351298676],[8537757.05666152,3360119.2325958745],[8537727.342837423,3359839.05595475],[8537689.747673199,3359559.827615929],[8537644.301012587,3359281.7692360636],[8537591.038931994,3359005.101543073],[8537530.003711851,3358730.0441609216],[8537461.243803052,3358456.8154352796],[8537384.81378849,3358185.6322601964],[8537300.774339737,3357916.7099059243],[8537209.192168871,3357650.2618480343],[8537110.139975524,3357386.499597955],[8537003.696389169,3357125.6325350706],[8536889.945906708,3356867.8677405114],[8536768.978825392,3356613.409832771],[8536640.89117114,3356362.460805272],[8536505.784622319,3356115.2198660253],[8536363.766429022,3355871.8832794903],[8536214.949327935,3355632.6442107796],[8536059.45145284,3355397.6925723194],[8535897.396240847,3355167.214873094],[8535728.912334401,3354941.394070592],[8535554.133479163,3354720.4094255697],[8535373.198417842,3354504.436359752],[8535186.250780057,3354293.64631658],[8534993.438968323,3354088.2066251133],[8534794.916040247,3353888.2803672035],[8534590.839587023,3353694.0262480355],[8534381.37160834,3353505.598470146],[8534166.678383779,3353323.1466110125],[8533946.930340817,3353146.815504317],[8533722.301919542,3352976.745124975],[8533492.971434176,3352813.0704780193],[8533259.120931529,3352655.921491432],[8533020.936046481,3352505.4229130032],[8532778.60585463,3352361.694211307],[8532532.322722193,3352224.849480862],[8532282.282153303,3352094.9973515626],[8532028.682634821,3351972.2409024467],[8531771.725478765,3351856.6775798686],[8531511.614662508,3351748.399120145],[8531248.556666858,3351647.491476733],[8530982.760312151,3351554.0347519983],[8530714.436592478,3351468.103133629],[8530443.798508206,3351389.7648357432],[8530171.060896885,3351319.08204474],[8529896.440262703,3351256.1108699352],[8529620.154604638,3351200.9012990193],[8529342.423243383,3351153.4971583774],[8529063.466647267,3351113.936078299],[8528783.506257227,3351082.2494631056],[8528502.764311032,3351058.4624662222],[8528221.463666866,3351042.5939702103],[8527939.827626416,3351034.656571777],[8527658.079757614,3351034.656571777],[8527376.443717165,3351042.5939702103],[8527095.143072998,3351058.4624662222],[8526814.401126804,3351082.2494631056],[8526534.440736763,3351113.936078299],[8526255.484140648,3351153.4971583774],[8525977.752779393,3351200.9012990193],[8525701.467121327,3351256.1108699352],[8525426.846487146,3351319.08204474],[8525154.108875824,3351389.7648357432],[8524883.470791552,3351468.103133629],[8524615.14707188,3351554.0347519983],[8524349.350717172,3351647.491476733],[8524086.292721523,3351748.399120145],[8523826.181905266,3351856.6775798686],[8523569.22474921,3351972.2409024467],[8523315.625230728,3352094.9973515626],[8523065.584661838,3352224.849480862],[8522819.3015294,3352361.694211307],[8522576.97133755,3352505.4229130032],[8522338.786452502,3352655.921491432],[8522104.935949855,3352813.0704780193],[8521875.605464488,3352976.745124975],[8521650.977043213,3353146.815504317],[8521431.229000252,3353323.1466110125],[8521216.535775691,3353505.598470146],[8521007.067797007,3353694.0262480355],[8520802.991343783,3353888.2803672035],[8520604.468415707,3354088.2066251133],[8520411.656603973,3354293.64631658],[8520224.708966188,3354504.436359752],[8520043.773904867,3354720.4094255697],[8519868.99504963,3354941.394070592],[8519700.511143183,3355167.214873094],[8519538.45593119,3355397.6925723194],[8519382.958056096,3355632.6442107796],[8519234.140955009,3355871.8832794903],[8519092.122761711,3356115.2198660253],[8518957.01621289,3356362.460805272],[8518828.928558638,3356613.409832771],[8518707.961477323,3356867.867740512],[8518594.210994862,3357125.6325350706],[8518487.767408507,3357386.499597955],[8518388.71521516,3357650.2618480343],[8518297.133044293,3357916.7099059243],[8518213.09359554,3358185.6322601964],[8518136.663580978,3358456.8154352796],[8518067.90367218,3358730.0441609216],[8518006.868452037,3359005.101543073],[8517953.606371444,3359281.7692360636],[8517908.159710832,3359559.827615929],[8517870.564546607,3359839.05595475],[8517840.85072251,3360119.232595874],[8517819.041825928,3360400.1351298676],[8517805.155169168,3360681.5405710693],[8517799.201775718,3360963.225534602],[8517801.186371492,3361244.9664136977],[8517811.107381081,3361526.539557202],[8517828.956929004,3361807.721447111],[8517854.720845954,3362088.288876007],[8517888.378680058,3362368.019124242],[8517929.903713098,3362646.6901367367],[8517979.262981731,3362924.0806992548],[8518036.417303652,3363199.970614003],[8518101.321308693,3363474.1408744315],[8518173.92347485,3363746.3738390836],[8518254.16616917,3364016.4534043646],[8518341.985693509,3364284.165176087],[8518437.312335093,3364549.2966396636],[8518540.070421861,3364811.6373288026],[8518650.178382529,3365070.978992581],[8518767.54881135,3365327.1157607585],[8518892.08853749,3365579.844307201],[8519023.698699,3365828.9640112827],[8519162.274821278,3366074.2771171452],[8519307.706900023,3366315.5888906782],[8519459.879488543,3366552.707774104],[8519618.671789404,3366785.4455380393],[8519783.95775032,3367013.6174309133],[8519955.60616422,3367237.042325631],[8520133.480773399,3367455.5428633504],[8520317.440377677,3367668.9455942786],[8520507.338946499,3367877.0811153543],[8520703.025734846,3368079.784204726],[8520904.345402898,3368276.893952909],[8521111.138139362,3368468.253890515],[8521323.239788307,3368653.712112463],[8521540.4819795,3368833.121398565],[8521762.692262046,3369006.3393303887],[8521989.694241283,3369173.228404316],[8522221.307718815,3369333.656140693],[8522457.348835554,3369487.495188996],[8522697.630217666,3369634.623428925],[8522941.961125316,3369774.9240673436],[8523190.147604082,3369908.285730994],[8523441.992638918,3370034.602554904],[8523697.296310546,3370153.7742664283],[8523955.855954157,3370265.7062648432],[8524217.466320295,3370370.309696445],[8524481.919737782,3370467.501525082],[8524749.00627857,3370557.204598072],[8525018.513924392,3370639.3477074453],[8525290.228735061,3370713.865646472],[8525563.935018303,3370780.6992614265],[8525839.415500976,3370839.795498539],[8526116.45150154,3370891.1074461183],[8526394.823103666,3370934.594371784],[8526674.309330793,3370970.2217548057],[8526954.68832155,3370997.9613135024],[8527235.737505872,3371017.7910276973],[8527517.23378169,3371029.6951561933],[8527798.953692015,3371033.664249272]]]}]};

In second variable

var secondVar={"geometries":[{"rings":[[[8535240.772971036,3437386.0715164784],[8535522.492881361,3437382.1024233997],[8535803.98915718,3437370.1982949036],[8536085.038341502,3437350.3685807087],[8536365.417332258,3437322.629022012],[8536644.903559385,3437287.0016389904],[8536923.27516151,3437243.5147133246],[8537200.311162075,3437192.2027657456],[8537475.791644748,3437133.106528633],[8537749.49792799,3437066.2729136785],[8538021.21273866,3436991.7549746516],[8538290.72038448,3436909.6118652783],[8538557.806925269,3436819.9087922885],[8538822.260342756,3436722.716963651],[8539083.870708894,3436618.1135320496],[8539342.430352505,3436506.1815336347],[8539597.734024134,3436387.00982211],[8539849.57905897,3436260.6929982],[8540097.765537735,3436127.33133455],[8540342.096445385,3435987.0306961313],[8540582.377827497,3435839.9024562025],[8540818.418944236,3435686.0634078993],[8541050.032421768,3435525.6356715225],[8541277.034401005,3435358.746597595],[8541499.24468355,3435185.5286657712],[8541716.486874744,3435006.1193796694],[8541928.58852369,3434820.661157721],[8542135.381260153,3434629.3012201153],[8542336.700928206,3434432.1914719325],[8542532.387716552,3434229.4883825607],[8542722.286285374,3434021.352861485],[8542906.245889653,3433807.9501305567],[8543084.12049883,3433589.449592837],[8543255.76891273,3433366.0246981196],[8543421.054873647,3433137.8528052457],[8543579.847174508,3432905.1150413104],[8543732.019763028,3432667.9961578846],[8543877.451841773,3432426.6843843516],[8544016.027964052,3432181.371278489],[8544147.638125561,3431932.2515744073],[8544272.177851701,3431679.523027965],[8544389.548280522,3431423.3862597873],[8544499.65624119,3431164.044596009],[8544602.414327959,3430901.70390687],[8544697.740969542,3430636.5724432934],[8544785.56049388,3430368.860671571],[8544865.803188201,3430098.78110629],[8544938.405354358,3429826.548141638],[8545003.3093594,3429552.3778812094],[8545060.46368132,3429276.487966461],[8545109.822949953,3428999.097403943],[8545151.347982993,3428720.426391448],[8545185.005817097,3428440.696143213],[8545210.769734047,3428160.1287143175],[8545228.61928197,3427878.946824408],[8545238.540291559,3427597.373680904],[8545240.524887333,3427315.6328018084],[8545234.571493883,3427033.9478382757],[8545220.684837123,3426752.542397074],[8545198.87594054,3426471.639863081],[8545169.162116444,3426191.4632219565],[8545131.56695222,3425912.234883135],[8545086.120291607,3425634.17650327],[8545032.858211014,3425357.5088102794],[8544971.822990872,3425082.451428128],[8544903.063082073,3424809.222702486],[8544826.633067511,3424538.0395274027],[8544742.593618758,3424269.1171731306],[8544651.011447892,3424002.6691152407],[8544551.959254544,3423738.9068651614],[8544445.51566819,3423478.039802277],[8544331.765185729,3423220.275007718],[8544210.798104413,3422965.8170999773],[8544082.710450161,3422714.8680724786],[8543947.60390134,3422467.6271332316],[8543805.585708043,3422224.2905466966],[8543656.768606955,3421985.051477986],[8543501.27073186,3421750.0998395258],[8543339.215519868,3421519.6221403005],[8543170.731613422,3421293.801337798],[8542995.952758184,3421072.816692776],[8542815.017696863,3420856.8436269583],[8542628.070059078,3420646.0535837864],[8542435.258247344,3420440.6138923196],[8542236.735319268,3420240.68763441],[8542032.658866044,3420046.433515242],[8541823.19088736,3419858.005737352],[8541608.4976628,3419675.553878219],[8541388.749619838,3419499.2227715235],[8541164.121198563,3419329.1523921816],[8540934.790713197,3419165.4777452257],[8540700.94021055,3419008.3287586384],[8540462.755325502,3418857.8301802096],[8540220.425133651,3418714.1014785133],[8539974.142001214,3418577.256748068],[8539724.101432323,3418447.404618769],[8539470.501913842,3418324.648169653],[8539213.544757785,3418209.084847075],[8538953.433941528,3418100.8063873514],[8538690.37594588,3417999.898743939],[8538424.579591172,3417906.4420192046],[8538156.255871499,3417820.5104008354],[8537885.617787227,3417742.1721029496],[8537612.880175905,3417671.4893119466],[8537338.259541724,3417608.5181371416],[8537061.973883659,3417553.3085662257],[8536784.242522404,3417505.904425584],[8536505.285926288,3417466.343345505],[8536225.325536247,3417434.656730312],[8535944.583590053,3417410.8697334286],[8535663.282945886,3417395.0012374166],[8535381.646905437,3417387.0638389834],[8535099.899036635,3417387.0638389834],[8534818.262996186,3417395.0012374166],[8534536.962352019,3417410.8697334286],[8534256.220405824,3417434.656730312],[8533976.260015784,3417466.343345505],[8533697.303419668,3417505.904425584],[8533419.572058413,3417553.3085662257],[8533143.286400348,3417608.5181371416],[8532868.665766167,3417671.4893119466],[8532595.928154845,3417742.1721029496],[8532325.290070573,3417820.5104008354],[8532056.9663509,3417906.4420192046],[8531791.169996193,3417999.898743939],[8531528.112000544,3418100.8063873514],[8531268.001184287,3418209.084847075],[8531011.04402823,3418324.648169653],[8530757.444509748,3418447.404618769],[8530507.403940858,3418577.256748068],[8530261.12080842,3418714.1014785133],[8530018.79061657,3418857.8301802096],[8529780.605731523,3419008.3287586384],[8529546.755228875,3419165.4777452257],[8529317.424743509,3419329.1523921816],[8529092.796322234,3419499.2227715235],[8528873.048279272,3419675.553878219],[8528658.355054712,3419858.005737352],[8528448.887076028,3420046.433515242],[8528244.810622804,3420240.68763441],[8528046.287694728,3420440.6138923196],[8527853.475882994,3420646.0535837864],[8527666.528245209,3420856.8436269583],[8527485.593183888,3421072.816692776],[8527310.81432865,3421293.801337798],[8527142.330422204,3421519.6221403005],[8526980.275210211,3421750.0998395258],[8526824.777335117,3421985.051477986],[8526675.96023403,3422224.2905466966],[8526533.942040732,3422467.6271332316],[8526398.83549191,3422714.8680724786],[8526270.747837659,3422965.8170999773],[8526149.780756343,3423220.2750077182],[8526036.030273883,3423478.039802277],[8525929.586687528,3423738.9068651614],[8525830.53449418,3424002.6691152407],[8525738.952323314,3424269.1171731306],[8525654.91287456,3424538.0395274027],[8525578.482859999,3424809.222702486],[8525509.7229512,3425082.451428128],[8525448.687731057,3425357.5088102794],[8525395.425650464,3425634.17650327],[8525349.978989853,3425912.234883135],[8525312.383825628,3426191.4632219565],[8525282.670001531,3426471.6398630803],[8525260.861104948,3426752.542397074],[8525246.97444819,3427033.9478382757],[8525241.02105474,3427315.6328018084],[8525243.005650513,3427597.373680904],[8525252.926660102,3427878.946824408],[8525270.776208024,3428160.1287143175],[8525296.540124975,3428440.696143213],[8525330.197959078,3428720.4263914484],[8525371.722992118,3428999.097403943],[8525421.082260752,3429276.487966461],[8525478.236582672,3429552.3778812094],[8525543.140587714,3429826.548141638],[8525615.74275387,3430098.78110629],[8525695.985448191,3430368.860671571],[8525783.80497253,3430636.5724432934],[8525879.131614113,3430901.70390687],[8525981.889700882,3431164.044596009],[8526091.99766155,3431423.3862597873],[8526209.36809037,3431679.523027965],[8526333.90781651,3431932.2515744073],[8526465.51797802,3432181.371278489],[8526604.094100298,3432426.6843843516],[8526749.526179044,3432667.9961578846],[8526901.698767563,3432905.1150413104],[8527060.491068425,3433137.8528052457],[8527225.777029341,3433366.0246981196],[8527397.425443241,3433589.449592837],[8527575.30005242,3433807.9501305567],[8527759.259656698,3434021.352861485],[8527949.15822552,3434229.4883825607],[8528144.845013866,3434432.1914719325],[8528346.164681919,3434629.3012201153],[8528552.957418382,3434820.661157721],[8528765.059067328,3435006.1193796694],[8528982.301258521,3435185.5286657712],[8529204.511541067,3435358.746597595],[8529431.513520304,3435525.6356715225],[8529663.126997836,3435686.0634078993],[8529899.168114575,3435839.9024562025],[8530139.449496686,3435987.0306961313],[8530383.780404337,3436127.33133455],[8530631.966883102,3436260.6929982],[8530883.811917938,3436387.00982211],[8531139.115589567,3436506.1815336347],[8531397.675233178,3436618.1135320496],[8531659.285599316,3436722.716963651],[8531923.739016803,3436819.9087922885],[8532190.825557591,3436909.6118652783],[8532460.333203413,3436991.7549746516],[8532732.048014082,3437066.2729136785],[8533005.754297324,3437133.106528633],[8533281.234779997,3437192.2027657456],[8533558.270780561,3437243.5147133246],[8533836.642382687,3437287.0016389904],[8534116.128609814,3437322.629022012],[8534396.50760057,3437350.3685807087],[8534677.556784892,3437370.1982949036],[8534959.05306071,3437382.1024233997],[8535240.772971036,3437386.`0715164784]]]}]};

I want to union these geometries

var uniongeometeries=firstvar.union(secondVar); 

and use in Identify task like below:

var identifyTask= new IdentifyTask(layer);
var identifyParams = new IdentifyParameters();
identifyParams.tolerance=1;
identifyParams.returnGeometry = true;
identifyParams.layerIds =[7];
identifyParams.geometry =uniongeometeries;
identifyParams.mapExtent=dlayer.fullExtent;
identifyTask.execute(identifyParams)
.addCallback(function(response){

})

It gives me an error firstVar.union is not an function

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.