我能够使用var @Override
public void onMapReady(GoogleMap googleMap) {
/*MapsInitializer.initialize(getContext());
mGoogleMap = googleMap;
googleMap.setMapType(googleMap.MAP_TYPE_NORMAL);
googleMap.addMarker(new MarkerOptions().position(new LatLng(46.689247, -74.0444502)).title("tada"));*/
mGoogleMap = googleMap;
// Add a marker in Sydney and move the camera
LatLng Ny = new LatLng(latt,lon);
mGoogleMap.addMarker(new MarkerOptions().position(Ny).title(getNumber));
mGoogleMap.moveCamera(CameraUpdateFactory.newLatLngZoom(Ny,8));
}
命名空间把手4.0。但是我正在使用myHandlebars=Handlebars.noConflict();
使用下面的代码
grunt-contrib-handlebars
,它在内部生成 options: {
namespace: 'MyApp.Templates',
processName: function(filePath) {
return filePath.replace(/^templates\//, '').replace(/\.hbs$/, '');
}
},
all: {
files: {
"js/templates.js": ["templates/**/*.hbs"]
}
}
}
之类的模板,我想使用MyApp.Templates["posts/detail"]=Handlebars.template({compiler:[7,">= 4.0.0"]
代替myHandlebars
,以便命名空间的车把对我有用,并且避免手动修改生成的JS