1

I am getting a multipolygon coordinates from DB in WKT format. I am able show the same on the map. But the problem I am facing is while zooming to center of the Multipolygon. Is there any way to zoom to the center of the Polygon in OL3 or otherwise.

Below is the response from my DB:

["MULTIPOLYGON(((155917.153194497 210867.51599128,155917.193016207 210867.518011615,155917.232550311 210867.523198616,155917.271545395 210867.531519298,155917.309753475 210867.542920746,155917.346931569 210867.557330454,155917.382843247 210867.574656784,155917.417260133 210867.594789552,155917.449963355 210867.617600725,155917.459648623 210867.625136389,155925.049736443 210873.681616414,155930.5385101 210878.034228535,155930.557274147 210878.049870081,155930.57525183 210878.066409438,155930.592400237 210878.083807125,155930.608678436 210878.102021616,155930.62404757 210878.121009431,155930.638470954 210878.140725247,155930.651914158 210878.161122003,155930.664345095 210878.182151013,155930.675734091 210878.203762078,155930.686053962 210878.225903616,155930.695280073 210878.248522773,155930.703390403 210878.271565559,155930.710365592 210878.294976969,155930.716188989 210878.318701123,155930.720846696 210878.342681389,155930.724327594 210878.366860528,155930.726623373 210878.391180824,155930.727728555 210878.415584225,155930.7276405 210878.440012481,155930.72635942 210878.46440728,155930.723888372 210878.488710394,155930.720233255 210878.51286381,155930.715402792 210878.536809876,155930.709408515 210878.560491431,155930.702264732 210878.583851948,155930.693988495 210878.606835667,155930.684599559 210878.629387724,155930.674120335 210878.651454289,155930.662575838 210878.672982688,155930.649993623 210878.693921535,155930.636403725 210878.714220847,155930.621838582 210878.733832171,155930.314001598 210879.127835574,155930.306328269 210879.137412143,155930.290545833 210879.155701929,155930.273898393 210879.173208051,155930.25642481 210879.189889642,155930.238165875 210879.20570776,155930.219164211 210879.220625479,155930.199464177 210879.234607976,155930.179111759 210879.24762261,155930.15815447 210879.259638998,155930.136641231 210879.27062909,155930.114622264 210879.280567231,155930.092148969 210879.289430221,155930.069273808 210879.29719737,155930.046050182 210879.303850547,155930.022532303 210879.30937422,155929.998775073 210879.313755494,155929.974833949 210879.316984143,155929.950764821 210879.319052628,155929.926623875 210879.319956122,155929.902467466 210879.319692516,155929.878351985 210879.318262424,155929.854333728 210879.315669185,155929.830468762 210879.311918853,155929.806812799 210879.307020182,155929.783421061 210879.300984608,155929.760348153 210879.293826221,155929.737647938 210879.285561731,155929.715373406 210879.276210431,155929.693576556 210879.26579415,155929.672308271 210879.254337204,155929.651618198 210879.241866339,155929.631554638 210879.228410667,155929.612164426 210879.214001598,155929.593492828 210879.19867277,155929.57558343 210879.182459965,155929.55847804 210879.165401031,155929.542216589 210879.147535791,155929.526837039 210879.12890595,155929.51237529 210879.109554996,155929.498865103 210879.089528104,155929.486338016 210879.068872023,155929.474823273 210879.047634974,155929.464347752 210879.025866533,155929.45493591 210879.003617515,155929.446609715 210878.980939859,155929.439388606 210878.957886505,155929.43328944 210878.934511267,155929.428326453 210878.910868714,155929.424511232 210878.887014036,155929.421852684 210878.86300292,155929.420357013 210878.838891417,155929.420027712 210878.814735815,155929.42086555 210878.790592501,155929.422868571 210878.766517836,155929.426032098 210878.74256802,155929.430348747 210878.718798963,155929.43580844 210878.695266149,155929.442398434 210878.672024515,155929.450103344 210878.649128316,155929.458905183 210878.626631,155929.468783405 210878.604585087,155929.47971495 210878.583042039,155929.4916743 210878.562052148,155929.504633535 210878.541664412,155929.518562405 210878.521926424,155929.525998402 210878.512164426,155929.528215101 210878.509327252,155924.427797164 210874.464682251,155924.426612493 210874.46373988,155916.835933049 210868.406787771,155916.826435632 210868.399016688,155916.808308571 210868.383047617,155916.790973999 210868.36622162,155916.774472383 210868.348577974,155916.758842244 210868.330157867,155916.744120069 210868.3110043,155916.730340225 210868.291161985,155916.717534881 210868.270677241,155916.705733929 210868.249597888,155916.694964917 210868.227973135,155916.685252985 210868.205853462,155916.676620805 210868.183290505,155916.669088526 210868.160336935,155916.662673734 210868.137046336,155916.657391401 210868.113473077,155916.653253861 210868.089672188,155916.65027077 210868.065699229,155916.648449094 210868.041610164,155916.647793083 210868.017461225,155916.648304271 210867.993308787,155916.649981464 210867.969209231,155916.652820745 210867.945218815,155916.656815489 210867.921393543,155916.661956368 210867.897789032,155916.668231382 210867.874460385,155916.675625882 210867.851462061,155916.684122608 210867.828847746,155916.693701723 210867.806670232,155916.704340867 210867.784981291,155916.716015204 210867.763831552,155916.72869748 210867.743270388,155916.74235809 210867.723345798,155916.756965145 210867.704104293,155916.775285178 210867.682436167,155916.794804875 210867.661842169,155916.815461372 210867.642388624,155916.837188144 210867.624138181,155916.85991522 210867.607149617,155916.883569407 210867.591477644,155916.908074526 210867.577172734,155916.933351656 210867.564280955,155916.959319394 210867.552843828,155916.985894109 210867.542898184,155917.012990216 210867.534476054,155917.040520452 210867.527604563,155917.068396155 210867.522305839,155917.096527551 210867.518596947,155917.124824041 210867.516489832,155917.153194497 210867.51599128)),((155819.523695822 210847.125799218,155819.566592749 210847.127682717,155819.609169899 210847.133239711,155819.621232026 210847.135497085,155820.409551358 210847.293064107,155820.452726118 210847.303710268,155820.49478424 210847.318150316,155820.535393062 210847.336270035,155820.574231383 210847.357926105,155820.610992009 210847.382947236,155820.645384177 210847.41113552,155820.677135859 210847.442268,155820.705995912 210847.476098429,155820.731736064 210847.512359223,155820.754152721 210847.550763573,155820.773068576 210847.591007716,155820.788334012 210847.632773337,155820.799828286 210847.675730086,155820.807460482 210847.719538192,155820.811170233 210847.763851151,155820.810928196 210847.808318466,155820.218936674 210859.655934809,155820.218892205 210859.656648841,155820.218863228 210859.657363669,155819.005802618 210882.61625623,155819.001599094 210882.659703093,155818.993622314 210882.702617781,155818.981933073 210882.744673233,155818.966620454 210882.785548937,155818.947801159 210882.824933371,155818.925618614 210882.862526378,155818.900241876 210882.898041454,155818.871864347 210882.931207932,155818.840702296 210882.961773044,155818.806993216 210882.989503846,155818.770994011 210883.014188998,155818.732979038 210883.035640368,155818.693238016 210883.053694472,155818.65207382 210883.068213715,155818.60980017 210883.079087443,155818.566739242 210883.086232786,155817.758499805 210883.184324268,155817.74630043 210883.185653142,155817.722205295 210883.187392687,155817.69805426 210883.187966369,155817.673903705 210883.187372847,155817.649810007 210883.185613508,155817.62582941 210883.182692458,155817.602017894 210883.178616517,155817.578431046 210883.173395199,155817.555123926 210883.167040693,155817.532150943 210883.159567833,155817.509565726 210883.150994064,155817.487420997 210883.1413394,155817.46576845 210883.130626379,155817.444658633 210883.11888001,155817.424140823 210883.106127714,155817.404262919 210883.092399259,155817.385071321 210883.077726693,155817.366610833 210883.062144269,155817.348924548 210883.045688362,155817.332053753 210883.028397386,155817.316037831 210883.010311706,155817.30091417 210882.991473541,155817.286718075 210882.971926867,155817.273482685 210882.951717315,155817.261238897 210882.93089206,155817.250015293 210882.909499718,155817.239838073 210882.887590228,155817.230730996 210882.865214734,155817.222715321 210882.842425471,155817.215809759 210882.819275637,155817.210030431 210882.795819275,155817.205390828 210882.77211114,155817.201901782 210882.748206577,155817.199571436 210882.724161389,155817.198405232 210882.700031707,155817.19840589 210882.67587386,155817.199573411 210882.651744242,155817.201905067 210882.627699181,155817.205395417 210882.603794809,155817.210036312 210882.580086927,155817.215816919 210882.556630879,155817.222723743 210882.533481423,155817.230740661 210882.510692596,155817.239848959 210882.488317599,155817.250027373 210882.466408664,155817.261252143 210882.445016934,155817.273497066 210882.424192347,155817.286733558 210882.403983516,155817.300930719 210882.384437616,155817.316055407 210882.365600276,155817.332072315 210882.347515469,155817.348944053 210882.330225413,155817.366631236 210882.31377047,155817.385092573 210882.298189053,155817.404284971 210882.283517534,155817.424163624 210882.269790163,155817.444682129 210882.257038985,155817.465792587 210882.245293767,155817.487445717 210882.234581927,155817.509590973 210882.224928471,155817.532176658 210882.216355933,155817.555150048 210882.208884325,155817.578457514 210882.20253109,155817.602044647 210882.197311058,155817.625856385 210882.193236415,155817.638019473 210882.191608554,155818.029353934 210882.144114488,155819.193874843 210860.103904609,155818.724603833 210860.079110113,155818.712358256 210860.078312303,155818.688324721 210860.075864705,155818.66443746 210860.072259107,155818.640752236 210860.067503924,155818.617324341 210860.061610258,155818.594208465 210860.054591866,155818.571458569 210860.046465132,155818.54912776 210860.037249027,155818.527268169 210860.026965066,155818.505930825 210860.015637256,155818.485165536 210860.003292039,155818.465020779 210859.989958235,155818.445543579 210859.975666971,155818.426779403 210859.960451608,155818.408772055 210859.944347664,155818.391563571 210859.927392734,155818.375194124 210859.909626396,155818.359701925 210859.891090124,155818.345123141 210859.871827191,155818.331491803 210859.851882562,155818.318839733 210859.831302798,155818.307196466 210859.810135939,155818.296589182 210859.788431398,155818.287042643 210859.766239842,155818.278579134 210859.743613075,155818.271218412 210859.720603917,155818.264977661 210859.697266081,155818.259871449 210859.673654046,155818.255911696 210859.649822934,155818.253107645 210859.625828375,155818.251465843 210859.601726382,155818.250990122 210859.577573219,155818.251681592 210859.55342527,155818.25353864 210859.529338906,155818.256556929 210859.505370353,155818.260729415 210859.481575566,155818.266046358 210859.458010089,155818.272495344 210859.434728934,155818.28006132 210859.41178645,155818.288726623 210859.389236193,155818.298471025 210859.367130805,155818.30927178 210859.345521888,155818.321103672 210859.324459887,155818.333939083 210859.303993969,155818.347748049 210859.284171909,155818.362498334 210859.265039981,155818.378155505 210859.246642846,155818.394683011 210859.229023451,155818.412042272 210859.212222926,155818.430192763 210859.19628049,155818.449092113 210859.18123336,155818.468696205 210859.167116662,155818.488959274 210859.15396335,155818.509834017 210859.141804129,155818.531271706 210859.130667384,155818.553222294 210859.120579112,155818.575634542 210859.111562863,155818.598456129 210859.103639686,155818.62163378 210859.096828075,155818.645113391 210859.091143933,155818.668840148 210859.086600528,155818.692758666 210859.083208465,155818.716813108 210859.080975665,155818.740947321 210859.079907339,155818.765104967 210859.08000598,155818.777366435 210859.080503029,155819.245206643 210859.105221927,155819.790652048 210848.189140094,155819.425231726 210848.116100921,155819.41322863 210848.113548207,155819.389797962 210848.107665572,155819.366678784 210848.100658066,155819.343925064 210848.092542045,155819.321589918 210848.083336456,155819.299725488 210848.073062789,155819.278382811 210848.061745027,155819.257611712 210848.049409589,155819.237460679 210848.036085272,155819.217976751 210848.021803181,155819.199205413 210848.006596655,155819.181190484 210847.990501192,155819.163974019 210847.973554366,155819.147596208 210847.955795738,155819.132095283 210847.937266763,155819.11750743 210847.918010697,155819.103866702 210847.898072489,155819.091204943 210847.877498684,155819.079551711 210847.85633731,155819.068934208 210847.834637766,155819.059377221 210847.812450708,155819.050903059 210847.789827928,155819.043531504 210847.766822239,155819.037279765 210847.743487344,155819.032162435 210847.719877716,155819.028191461 210847.696048471,155819.025376113 210847.672055235,155819.023722962 210847.647954017,155819.023235868 210847.623801082,155819.023915967 210847.59965281,155819.025761673 210847.575565573,155819.028768677 210847.551595603,155819.032929958 210847.527798853,155819.043146041 210847.48609363,155819.056902649 210847.445418704,155819.074098331 210847.406074042,155819.094606271 210847.368349802,155819.11827523 210847.332524192,155819.144930653 210847.298861418,155819.174375962 210847.267609736,155819.206394006 210847.238999619,155819.240748657 210847.21324206,155819.277186559 210847.190527017,155819.31543899 210847.171022006,155819.355223847 210847.154870874,155819.396247726 210847.142192732,155819.438208084 210847.133081077,155819.480795473 210847.127603106,155819.523695822 210847.125799218)),((155874.628566451 210834.271399732,155874.669000972 210834.273463876,155874.709135927 210834.278792727,155874.748708156 210834.287351345,155874.78745819 210834.299083613,155874.825131951 210834.313912603,155874.861482418 210834.331741084,155874.896271248 210834.352452158,155874.929270334 210834.375910025,155884.802149793 210842.014257789,155884.805033224 210842.016505512,155891.596139137 210847.35041118,155891.596144907 210847.350415712,155898.452674787 210852.735869688,155907.923062213 210860.147649202,155907.932632486 210860.155330381,155907.950909324 210860.17112781,155907.968401789 210860.1877896,155907.985069045 210860.205276857,155908.000872185 210860.223548757,155908.015774317 210860.242562648,155908.029740655 210860.262274142,155908.042738594 210860.282637225,155908.054737793 210860.303604361,155908.06571024 210860.325126605,155908.075630321 210860.347153714,155908.084474879 210860.36963427,155908.092223267 210860.392515792,155908.098857397 210860.415744866,155908.104361783 210860.439267266,155908.108723574 210860.463028082,155908.111932589 210860.486971845,155908.113981337 210860.511042661,155908.114865034 210860.53518434,155908.114581618 210860.559340525,155908.113131751 210860.583454824,155908.110518818 210860.607470947,155908.106748917 210860.631332829,155908.101830849 210860.654984768,155908.095776095 210860.678371549,155908.08859879 210860.701438578,155908.080315688 210860.724132009,155908.070946125 210860.746398865,155908.060511973 210860.768187166,155908.049037591 210860.789446049,155908.036549764 210860.810125888,155908.023077643 210860.830178408,155908.008652678 210860.849556797,155907.993308544 210860.868215819,155907.977081058 210860.886111916,155907.960008103 210860.903203311,155907.942129534 210860.919450106,155907.923487087 210860.934814374,155907.904124281 210860.94926025,155907.884086317 210860.962754009,155907.86341997 210860.975264153,155907.842173486 210860.986761478,155907.820396461 210860.997219144,155907.798139733 210861.006612739,155907.775455258 210861.014920334,155907.752395989 210861.022122536,155907.729015758 210861.028202532,155907.705369142 210861.033146129,155907.681511344 210861.036941787,155907.657498056 210861.039580645,155907.633385335 210861.041056542,155907.609229471 210861.041366035,155907.585086852 210861.040508399,155907.561013838 210861.038485637,155907.537066624 210861.035302471,155907.513301114 210861.030966333,155907.489772786 210861.025487343,155907.466536563 210861.018878293,155907.44364669 210861.01115461,155907.4211566 210861.002334325,155907.399118795 210860.992438027,155907.377584719 210860.98148882,155907.356604641 210860.969512263,155907.336227539 210860.956536313,155907.31650098 210860.942591262,155907.306745083 210860.935147262,155897.836013583 210853.523098467,155897.835325892 210853.522559292,155890.978455139 210848.136837578,155884.188789859 210842.804063419,155874.986091074 210835.684214141,155874.982217087 210835.70888343,155874.98016471 210835.720982124,155874.975259536 210835.74463674,155874.96921753 210835.768026818,155874.962052799 210835.791097756,155874.953782068 210835.813795698,155874.944424643 210835.836067658,155874.93400237 210835.857861643,155874.922539577 210835.879126777,155874.910063023 210835.89981342,155874.896601835 210835.91987328,155874.882187435 210835.939259529,155874.866853473 210835.957926912,155874.850635744 210835.975831851,155874.833572108 210835.99293255,155874.815702398 210836.009189088,155874.797068328 210836.024563515,155874.777713399 210836.039019943,155874.757682792 210836.052524622,155874.737023268 210836.065046029,155874.715783054 210836.076554933,155874.694011733 210836.087024468,155874.671760128 210836.096430192,155874.649080184 210836.104750151,155874.626024845 210836.111964921,155874.602647931 210836.11805766,155874.579004013 210836.123014146,155874.555148287 210836.126822807,155874.531136441 210836.129474754,155874.507024529 210836.130963794,155874.482868836 210836.131286453,155874.458725754 210836.130441977,155874.434651641 210836.128432337,155874.410702696 210836.125262225,155874.386934826 210836.120939041,155874.363403514 210836.115472876,155874.340163693 210836.108876493,155874.317269613 210836.101165287,155874.294774719 210836.092357262,155874.272731522 210836.082472979,155874.251191481 210836.071535511,155874.230204879 210836.059570391,155874.209820707 210836.04660555,155874.19008655 210836.032671254,155874.171048475 210836.017800031,155874.152750925 210836.002026596,155874.135236614 210835.985387771,155874.118546428 210835.967922398,155874.102719328 210835.949671248,155874.087792261 210835.930676927,155874.073800073 210835.910983774,155874.060775427 210835.890637763,155874.048748728 210835.869686389,155874.037748052 210835.84817856,155874.027799078 210835.826164485,155874.018925032 210835.803695554,155874.011146629 210835.780824218,155874.004482026 210835.757603868,155873.998946783 210835.73408871,155873.994553819 210835.710333638,155873.991313391 210835.686394106,155873.989233063 210835.662325998,155873.988317691 210835.638185499,155873.988569412 210835.614028964,155873.989987639 210835.589912782,155873.992569059 210835.565893252,155873.994323901 210835.553747834,155874.129366686 210834.693804337,155874.138227745 210834.650161474,155874.150936925 210834.607480159,155874.167393405 210834.566098979,155874.18746664 210834.526346204,155874.21099739 210834.488537188,155874.237798988 210834.452971865,155874.267658822 210834.419932371,155874.300340018 210834.389680804,155874.335583318 210834.362457144,155874.373109143 210834.338477355,155874.412619806 210834.317931664,155874.453801873 210834.300983059,155874.496328652 210834.287765989,155874.539862783 210834.278385305,155874.584058917 210834.272915422,155874.628566451 210834.271399732)),((155857.717145232 210821.110027787,155857.757065525 210821.11205577,155857.79669626 210821.117266093,155857.835784155 210821.125625455,155857.874079403 210821.137080433,155857.91133726 210821.151557818,155857.947319611 210821.168965085,155857.981796495 210821.189190985,155858.01454757 210821.212106255,155865.148522608 210826.64094326,155865.169291447 210826.657640378,155865.189141201 210826.675420301,155865.208015485 210826.694232526,155865.225860687 210826.714023615,155865.242626115 210826.73473735,155865.258264147 210826.756314893,155865.272730363 210826.778694951,155865.285983669 210826.801813954,155865.29798642 210826.82560623,155865.30870452 210826.850004195,155865.318107526 210826.874938547,155865.326168726 210826.900338458,155865.332865222 210826.926131778,155865.338177993 210826.952245239,155865.342091948 210826.978604666,155865.344595969 210827.005135182,155865.345682942 210827.031761426,155865.345349781 210827.058407766,155865.343597432 210827.08499851,155865.340430872 210827.111458127,155865.335859096 210827.137711455,155865.32989509 210827.163683922,155865.322555796 210827.189301752,155865.313862062 210827.214492174,155865.303838581 210827.239183635,155865.292513828 210827.263305998,155865.279919969 210827.28679074,155865.266092779 210827.309571153,155865.251071534 210827.331582528,155865.234898904 210827.35276234,155865.217620826 210827.373050426,155865.199286382 210827.392389158,155864.6030625 210827.988613041,155864.594279382 210827.997183192,155864.576385821 210828.013413474,155864.557729197 210828.028760524,155864.538353062 210828.043188517,155864.518302648 210828.056663771,155864.49762476 210828.069154829,155864.47636767 210828.080632533,155864.454581 210828.091070089,155864.432315608 210828.100443131,155864.409623472 210828.10872978,155864.386557564 210828.115910689,155864.36317173 210828.121969097,155864.33952056 210828.126890861,155864.315659267 210828.13066449,155864.291643553 210828.133281177,155864.26752948 210828.134734812,155864.24337334 210828.135022002,155864.219231524 210828.134142077,155864.195160387 210828.132097091,155864.171216123 210828.128891817,155864.147454626 210828.124533739,155864.123931366 210828.119033029,155864.100701256 210828.112402529,155864.077818523 210828.104657716,155864.055336586 210828.095816671,155864.033307927 210828.085900032,155864.011783968 210828.074930948,155863.990814957 210828.062935025,155863.970449844 210828.049940268,155863.950736168 210828.035977011,155863.931719949 210828.02107785,155863.913445579 210828.005277565,155863.895955719 210827.988613042,155863.879291195 210827.971123181,155863.863490911 210827.952848812,155863.84859175 210827.933832593,155863.834628492 210827.914118917,155863.821633735 210827.893753803,155863.809637813 210827.872784792,155863.798668729 210827.851260834,155863.788752089 210827.829232175,155863.779911044 210827.806750238,155863.772166232 210827.783867505,155863.765535731 210827.760637395,155863.760035021 210827.737114134,155863.755676943 210827.713352638,155863.752471669 210827.689408373,155863.750426683 210827.665337237,155863.749546758 210827.641195421,155863.749833948 210827.617039281,155863.751287583 210827.592925208,155863.75390427 210827.568909493,155863.757677899 210827.545048201,155863.762599663 210827.521397031,155863.768658071 210827.498011196,155863.77583898 210827.474945288,155863.784125628 210827.452253152,155863.793498671 210827.429987761,155863.803936226 210827.408201091,155863.81541393 210827.386944001,155863.827904989 210827.366266113,155863.841380243 210827.346215699,155863.855808235 210827.326839564,155863.871155285 210827.30818294,155863.887385567 210827.290289379,155863.895955718 210827.281506261,155864.087396976 210827.090065002,155857.80841408 210822.311862875,155857.717545339 210822.432242838,155857.710032418 210822.441945758,155857.694556493 210822.460495619,155857.678202644 210822.478276316,155857.661009047 210822.495246343,155857.643015839 210822.511366084,155857.624265024 210822.526597909,155857.604800373 210822.540906261,155857.584667326 210822.554257739,155857.56391288 210822.566621175,155857.542585485 210822.577967707,155857.520734927 210822.588270849,155857.498412216 210822.597506548,155857.475669461 210822.605653244,155857.452559753 210822.612691921,155857.429137039 210822.618606146,155857.405455998 210822.623382113,155857.381571911 210822.627008674,155857.357540532 210822.629477363,155857.333417962 210822.630782416,155857.309260511 210822.630920787,155857.285124573 210822.629892154,155857.261066492 210822.627698917,155857.237142428 210822.624346196,155857.21340823 210822.619841818,155857.189919303 210822.614196298,155857.166730481 210822.607422815,155857.143895894 210822.599537181,155857.121468849 210822.590557804,155857.099501698 210822.580505646,155857.078045724 210822.569404172,155857.057151011 210822.557279298,155857.036866338 210822.544159329,155857.017239056 210822.530074891,155856.998314984 210822.515058863,155856.980138299 210822.4991463,155856.962751431 210822.482374347,155856.94619497 210822.464782156,155856.930507564 210822.446410796,155856.915725835 210822.427303152,155856.901884288 210822.40750383,155856.889015236 210822.387059049,155856.877148721 210822.366016535,155856.866312443 210822.344425411,155856.856531699 210822.322336078,155856.847829321 210822.299800103,155856.840225624 210822.276870093,155856.833738358 210822.253599576,155856.828382667 210822.230042875,155856.824171054 210822.206254981,155856.821113349 210822.182291425,155856.819216691 210822.158208148,155856.818485508 210822.134061369,155856.818921506 210822.109907456,155856.820523668 210822.085802796,155856.823288253 210822.061803658,155856.827208808 210822.037966065,155856.83227618 210822.014345665,155856.838478541 210821.990997596,155856.845801412 210821.967976364,155856.854227697 210821.945335708,155856.863737727 210821.923128482,155856.874309301 210821.901406525,155856.885917741 210821.880220547,155856.898535948 210821.859620002,155856.912134467 210821.839652983,155856.919407003 210821.829768608,155857.312688785 210821.308761648,155857.330962982 210821.28596915,155857.350537128 210821.264282817,155857.371344401 210821.243776681,155857.39331377 210821.224520745,155857.416370237 210821.206580745,155857.440435091 210821.190017925,155857.465426181 210821.174888825,155857.491258193 210821.161245094,155857.517842941 210821.149133307,155857.545089673 210821.138594813,155857.572905372 210821.129665586,155857.601195084 210821.12237611,155857.629862232 210821.116751268,155857.658808954 210821.112810264,155857.687936433 210821.11056655,155857.717145232 210821.110027787)))"]

Below is the code for showing the layer on the map:

var vectorSource = new ol.source.Vector({
  features: (new ol.format.WKT()).readFeatures(result)
});

vectorSource.addFeature(new ol.Feature(new ol.geom.Circle([5e6, 7e6], 1e6)));
var closevectorSource = new ol.source.Vector({
  features: (new ol.format.WKT()).readFeatures(result)
});

closevectorSource.addFeature(new ol.Feature(new ol.geom.Circle([5e6, 7e6], 1e6)));

var vectorLayer = new ol.layer.Vector({
      source: vectorSource,
      style: new ol.style.Style({
                            stroke: new ol.style.Stroke({
                              color:[255, 0, 0, 1.0],
                              opacity: 1,
                              width: 4
                              }),
                              fill: new ol.style.Stroke ({
                                  color: [255, 0, 0, 0.2]
                              })

              }),
         name: 'JMSvectorLayer'
        });
var JMSVectorLayer = findmapLayer("name","JMSvectorLayer");

if(JMSVectorLayer !== null){
    map.removeLayer(JMSVectorLayer);
    }

map.addLayer(vectorLayer);
0

If you manage to zoom to the centroid of that geometry you would not necessarily see anything because the centroid is where the red star is in this image.

enter image description here

0

To zoom to a feature and have all of the feature in view you could use view.fit(feature.getGeometry())

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.