简体   繁体   English

适用于iOS的Google Maps SDK-折线

[英]Google Maps SDK for iOS - Polylines

How to cusomize the polylines on google maps ? 如何自定义Google地图上的折线?

Now I'm doing like in the documentation: 现在,我就像在文档中那样:

GMSMutablePath *path = [GMSMutablePath path];
[path addCoordinate:CLLocationCoordinate2DMake(37.36, -122.0)];
[path addCoordinate:CLLocationCoordinate2DMake(37.45, -122.0)];
[path addCoordinate:CLLocationCoordinate2DMake(37.45, -122.2)];
[path addCoordinate:CLLocationCoordinate2DMake(37.36, -122.2)];
[path addCoordinate:CLLocationCoordinate2DMake(37.36, -122.0)];

GMSPolyline *polyline = [GMSPolyline polylineWithPath:path];
polyline.strokeColor = [UIColor greenColor];
polyline.strokeWidth = 10.f;
polyline.geodesic = YES;

polyline.map = mapView_;

But I need to give some effect to line (say glow effect). 但是我需要给线一些效果(例如发光效果)。

How to realise this? 如何实现呢?

Thank you 谢谢

Right now you can only set colors or gradients (transition between two colors), optionally with alpha (transparency) for polylines. 现在,您只能设置颜色或渐变(两种颜色之间的过渡),也可以设置折线的alpha(透明度)。 See https://developers.google.com/maps/documentation/ios/shapes#polylines 请参阅https://developers.google.com/maps/documentation/ios/shapes#polylines

There is no glow or other effect for polylines. 折线没有辉光或其他效果。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM