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