mglmapview

Is it possible to make MGLPolyLines selectable? - Swift, MapBox

拟墨画扇 提交于 2019-12-20 07:33:12
问题 Is it possible to make an MGLPolyLine touchable/selectable/have user interaction? In my project, the user needs to touch the polyline. There was this question asked before but it is outdated by about 2 years. Have they (MapBox) updated this? 回答1: I've just checked back and it looks like this has been implemented though I'm not sure which Mapbox release rolled this out. If you take a look at the simple Mapbox example, Annotation Models, that demos an MGLPolyline and interspaced circular

How to change the color of a MGLPolyline?

£可爱£侵袭症+ 提交于 2019-12-11 16:59:51
问题 How can I change the color of an MGLPolyline? I had looked here but the answer did not work. I also tried some other code but it was too dependant on apple maps. So how can I change the color of the line and preferably be able to edit other aspects of the line as well? Bellow is where I believe in the code I should be doing these edits but I am not 100%. @objc func useButtonTap(_ sender: UIGestureRecognizer) { print("use tap button pressed") startButton.backgroundColor = UIColor(red: 1.0,

Is it possible to make MGLPolyLines selectable? - Swift, MapBox

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-02 09:56:33
Is it possible to make an MGLPolyLine touchable/selectable/have user interaction? In my project, the user needs to touch the polyline. There was this question asked before but it is outdated by about 2 years. Have they (MapBox) updated this? I've just checked back and it looks like this has been implemented though I'm not sure which Mapbox release rolled this out. If you take a look at the simple Mapbox example, Annotation Models , that demos an MGLPolyline and interspaced circular annotations, you can make a simple mod to the supplied code and see for yourself. The demo looks like this: If