android - phonegap WFS proxy issue -


i encountered problem when try package sencha-touch app using phonegap. works fine except accessing wfs in phonegap. (and app has no problem running in browser, wfs access ok)

my phonegap version 2.9; openlayer version 2.13

here present simple code. can check example codes in following site: http://openlayers.org/dev/examples/wfs-filter.html

var rooturl = window.location.protocol + "//" + window.location.host + '/'; var map;

    function init() {          map = new openlayers.map({             div: "map",             layers: [             new openlayers.layer.wms(                 "natural earth",                 "http://demo.opengeo.org/geoserver/wms",                 { layers: "topp:naturalearth" }                 ),             new openlayers.layer.vector("wfs", {                 strategies: [new openlayers.strategy.bbox()],                 protocol: new openlayers.protocol.wfs({                     url: rooturl + 'proxy.py?url=http://demo.opengeo.org/geoserver/wfs',                     featuretype: "tasmania_roads",                     featurens: "http://www.openplans.org/topp"                 }),                 stylemap: new openlayers.stylemap({                     strokewidth: 3,                     strokecolor: "#333333"                 }),             })             ],             center: new openlayers.lonlat(146.7, -41.8),             zoom: 6         });      } 

in phonegap there's no problem accessing wms, when try wfs, never work.

comparing link showed before, there's road displayed in map, , obtained through wfs. in phonegap app, road not displayed.

i'm wondering whether wfs issue, or phonegap issue. blocking access wfs in phonegap app.

please give me suggestions , hints, guys! appreciate it.

function getlayerlist() {         $.ajax({ url: rooturl + 'proxy.py?url=http://192.168.0.23/lbeservice/service1.svc/geteventlist',             //async: false,             data: json.stringify({}),             type: "post",             datatype: "json",             contenttype: "application/json; charset=utf-8",             success: function (result) {                 console.log(result);                 $("#demo").html(result[0].event_name);             },             error: function (xhr, ajaxoptions, thrownerror) {                 alert(xhr.status);                 alert(thrownerror);             }         }).done(function () {          });     } 

have added domain hosting wfs white list?

http://docs.phonegap.com/en/1.9.0/guide_whitelist_index.md.html


Comments

Popular posts from this blog

user interface - How to replace the Python logo in a Tkinter-based Python GUI app? -

objective c - Greedy NSProgressIndicator Allocation -

how to set an OCR language in Google Drive -