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(",");