javascript - OpenLayers resolutions from web.config -


I'm trying to be stored in web.config resolution of their maps and property string in my Aspiknet

web.config & lt; Mplayer & gt; & Lt; Use buffer mapsBuffarmaps = "1" zoom offset = "13" resolution = "19.1092570678711,9.55462853393555,4.77731426696777,2.38865713348389,1.19432856674 1945,0.5 971642833709725" /> & Lt; / Maplayers & gt;

When I read the resolutions property in my Javascript, I get the following error:

item [19.1092570678711, 9.55462853393555,4.777314 a ?? | 66661945,0.5 9 71642833709725] No method 'sort'

I think it can be because it is a string, but how can I solve it?

My JavaScript

  var str1 = "["; Var str2 = "]"; Var res_str = str1.concat (ob.resolutions, str2); Var mapnik_layer = New Open Layer. Leyrkosm ( "OpenStreetMap", "http: // Sthaniyhost / Vebclent / Opanstriitmap / $ {z} / $ {x} / $ {y} Kpianjiji" {Jhumofset: 13, Resolution: Res_str}); Map.addLayers ([mapnik_layer]);    

It is suspected or because resolution considered An array instead of string.

/ Block>

ex> var res_str = ob.resolutions. Split (',');

The Outlook:

  [ "19.1092570678711", "9.554628533 9 3555", "4.77731426696777", "2.38865713348389", "1.194328566741945", "0.5971642833709725 "]   

an array of strings, rather than just a string:

 " [19.10 9 2570678711, 9.554628533 9 3555, 4.77731426696777, 2.38865713348389, 1.194328566741945, 0.5971642833709725] "   

Comments

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -