Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/361.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
java中数组的字符串变量_Java_Php_Openlayers - Fatal编程技术网

java中数组的字符串变量

java中数组的字符串变量,java,php,openlayers,Java,Php,Openlayers,在上面的代码中,我得到一个请求变量,如 map.addLayer( new OpenLayers.Layer.Vector(layer_id,{ strategies: [new OpenLayers.Strategy.BBOX()], protocol: new OpenLayers.Protocol.HTTP({ url: 'ajax.jsp?action=getPoi', format: new OpenLayers.Format.T

在上面的代码中,我得到一个请求变量,如

map.addLayer(
    new OpenLayers.Layer.Vector(layer_id,{
    strategies: [new OpenLayers.Strategy.BBOX()],
    protocol: new OpenLayers.Protocol.HTTP({
        url: 'ajax.jsp?action=getPoi',
        format: new OpenLayers.Format.Text()
        }),

    projection: map.displayProjection,) 
    displayInLayerSwitcher:false
    }); 
我需要把bbox中的值放到java中的数组中,这怎么可能呢 我在php中看到了一个示例,例如

bbox=-0.12856930694582,51.499827348159,-0.1114031692505,51.510512307879
在java中使用split

$bbox_vars = explode(",", $bbox); 

您发布的代码看起来不像,而是。当你说“获取请求变量”时,你能澄清你的意思吗?是的。上面的代码看起来不像java代码。很抱歉,@oops可能重复,注释已删除。@KugathasanAbimaranok@NambiNarayanan谢谢,先生,但我仍然怀疑如何将该值赋给下面给出的双变量,这是我写的,正确吗??minlon,minlat都是双变量minlon=bboxvar(0);minlat=bboxvar.getDouble(1);maxlon=bboxvar.getDouble(2);maxlat=bboxvar.getDouble(3)@AnasA很高兴能帮忙
String[] bboxvar=bbox.split(",");