正如标题所述,我想通过按下按钮在我自己的应用程序中打开ios设备中的本机地图应用程序.目前我使用了一个MKmapview显示一个简单的引脚,从json文件中取出lat/long .
代码是这样的:
- (void)viewDidLoad {
[super viewDidLoad];
}
// We are delegate for map view
self.mapView.delegate = self;
// Set title
self.title = self.location.title;
// set texts...
self.placeLabel.text = self.location.place;
self.telephoneLabel.text = self.location.telephone;
self.urlLabel.text = self.location.url;
**// Make a map annotation for a pin from the longitude/latitude points
MapAnnotation *mapPoint = [[MapAnnotation alloc] init];
mapPoint.coordinate = CLLocationCoordinate2DMake([self.location.latitude doubleValue], [self.location.longitude doubleValue]);
mapPoint.title = self.location.title;**
// Add it to the map view
[self.mapView addAnnotation:mapPoint];
// Zoom to …Run Code Online (Sandbox Code Playgroud) 我正在使用本教程制作示例应用程序.它使用填充了包含位置的JSon文件的表视图.在详细视图中,它使用Map并为表列表视图中选择的位置放置一个引脚.
我的问题是如何绘制当前用户位置之间的路线作为起点和"位置"位置作为目的地?
我现在在我的地图上有2个引脚:1)当前位置和2)目的地但我不知道如何将它们与路线相关联.使用这两个参数打开默认地图应用程序不是一个选项.
每个答案都要提前感谢.
我是jquery的新手,我试图添加然后删除一个div类.首先,我addClass();在单击div时添加类名,然后我想通过单击链接将其删除.这是我到目前为止编写的代码,但它不起作用.
https://jsfiddle.net/j2tsk90k/1/
我究竟做错了什么?
HTML:
<div class="block yellow expandable skewX">
<div>Test</div> <span id="transp">
<a id="close">close</a>
</span>
</div>
Run Code Online (Sandbox Code Playgroud)
JS:
$('.expandable').on('click', function () {
$(this).addClass('fullscreen');
});
$('#close').click(function () {
$('.expandable').removeClass('fullscreen');
});
Run Code Online (Sandbox Code Playgroud)
注意:
提前致谢
ios ×2
addclass ×1
apple-maps ×1
css ×1
iphone ×1
javascript ×1
jquery ×1
maps ×1
mkmapview ×1
objective-c ×1
removeclass ×1