0
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
    }); 

in the above code i get a request variable such as

bbox=-0.12856930694582,51.499827348159,-0.1114031692505,51.510512307879

and i need to put the value in bbox to an array in java how is it possible i saw an example in php such as

$bbox_vars = explode(",", $bbox); 
Abimaran Kugathasan
  • 31,165
  • 11
  • 75
  • 105
Anas A
  • 199
  • 4
  • 19
  • 1
    The code that you've posted does not look like [Java](https://en.wikipedia.org/wiki/Java_%28programming_language%29), but rather [JavaScript](https://en.wikipedia.org/wiki/JavaScript). Can you clarify what you mean when you say you "get a request variable"? – ruakh Mar 04 '14 at 07:04
  • Yes. The above code doesn't look like java code. – Stunner Mar 04 '14 at 07:06
  • possible duplicate of [string to string array conversion in java](http://stackoverflow.com/questions/3413586/string-to-string-array-conversion-in-java) – Ahsan Shah Mar 04 '14 at 07:08

1 Answers1

1

Use split in java

String[] bboxvar=bbox.split(",");
Nambi
  • 11,944
  • 3
  • 37
  • 49