上
我有一个页面,我需要在设备的当前位置获取用户基础的当前位置,我使用了" buildfire.geo.getCurrentPosition",它正在工作关于Local -Host开发,但在发布期间不起作用。
buildfire.geo.getCurrentPosition(null, (err, position) => {
if(err)
console.log(err);
else {
let currentLoc = this.state.currentLoc;
currentLoc['coordinates'] = {lat: position.coords.latitude, lng: position.coords.longitude};
this.setState({currentLoc});
}
});
在local主机上工作
更新插件后,在应用程序控制面板上不在
确保您正在检查该位置的插件具有插件中指定的适当功能。
这是一个示例插件。示例,其中包括该功能。
{
"author":"Jane Doe"
,"pluginName":"Sample Plugin "
,"pluginDescription":"This is an example"
,"supportEmail":"support@buildfire.com"
,"control":{
"content":{
"enabled":true
}
, "design":{
"enabled":true
}
, "settings":{
"enabled":false
}
},
"features" : [{"name" : "GEO"}],
"languages" : ["en"],
}
请注意,在插件中添加新功能。JSON需要您的应用程序的硬构建,因此您不会立即看到更改。
我已将功能添加到plugin.json文件中。
{
"author": "Sio Donayre"
,"pluginName": "Coupon Plugin"
,"pluginDescription": "Simple Discount Coupon Plugin"
,"supportEmail": "sio.donayre@go-va.com.au"
,"control": {
"content": {
"enabled": true
}
, "design": {
"enabled": false
}
, "settings": {
"enabled": false
}
}
,"widget": {},
"features" : [
{
"name": "GEO"
},
{
"name" : "Calendar"
}
],
"languages" : ["en"]
}