js代码:
var feature URLTest=[["http://192.168.15.174:6080/arcgis/rest/services/Sample/GQYDGH/FeatureServer/0","线图层1"]];function createSelectOption(feature URLTest){    var _html="";    for(var _i=0;_i<feature URLTest.length;_i++){        _html=_html+"<option value='"+feature URLTest[_i][0]+"'>"+feature URLTest[_i][1]+"</option>";    }    $("#feature Options").append(_html);    var html=$("#feature Options");    //console.log(html);}$(function(){    createSelectOption(feature URLTest);});
html代码:
<div>    <lable>选择操作图层:</lable>    <br/>    <select id="feature Options">        <option id="defaultOption" value="0">            请选择操作图层        </option>    </select></div>


收藏 打印