0
首先:感谢几天前我从你们那里得到了如此快速的反馈。Tabris 0.11 iOS EXC_BAD_ACCESS地理定位
我还在Tabris 0.11玩耍,并试图像你们在演示项目中那样实施Geolocation。
一切都在Android上工作的伟大,但iOS版(IPhone 5)根据我得到的错误
EXC_BAD_ACCESS (code=1, address=0xbbadbeef)
这里是我的代码看起来像
public void create(Composite parent, UIContext context) {
// creation of the layout types
createLayouts();
parent.setLayout(GridLayoutFactory.fillDefaults().margins(0, 0).spacing(0, 0).create());
createContainer(parent);
createBrowser();
}
private void createLayouts() {
layoutGrid = new GridLayout();
layoutGrid.numColumns = 1;
layoutGridData = new GridData();
layoutGridData.horizontalAlignment = GridData.FILL;
}
private void createContainer(Composite parent) {
[...]
containerBrowser = new Composite(parent, SWT.NONE);
containerBrowser.setLayout(layoutGrid);
containerBrowser.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
[...]
}
private void createBrowser() {
browser = new Browser(containerBrowser, SWT.NONE);
browser.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
lastLat = 48.775418;
lastLon = 9.181759;
setBrowserUrl(lastLat, lastLon);
}
private void setBrowserUrl(double lat, double lon) {
StringBuilder builder = new StringBuilder();
builder.append("http://open.mapquestapi.com/staticmap/v4/getmap");
builder.append("?size=" + 200 + "," + 200);
builder.append("&zoom=16");
lastLat = lat;
lastLon = lon;
builder.append("¢er=" + lat + "," + lon);
builder.append("&imageType=png");
if(lastLabel != null) {
builder.append("&pois=" + lastLabel + "," + lat + "," + lon + ",0,0");
}
browser.setUrl(builder.toString());
}
我不是真的经历iOS,我希望这些信息可以帮助你们。
由于提前,托比
有关此问题的任何更新? – Jordi 2013-05-02 12:39:43