• 高德地图聚合


    使用git做版本控制

    步骤如下:

    下载,拖进来.a

    拷贝算法文件

    拷贝SDDemandListViewController

    根据报错修改相应文件

    添加方法 makeContent

    添加属性@property (nonatomic, strong) NSNumber *category;           //任务分类 sven添加

    拖进来图片资源搞定

    ------------------------------------------------------------------------

     bug

    计算机生成了可选文字:
Vender 
Alipay 
AlipaySDKbundIe 
O Link /Users/sve/Library/DeveIoper/Xcode/DerivedData/puhuibao-bxpuywqykhivfpfkehcyupebbaIp/BuiId/Intermediates/puhuibao.buiId/Debug-iphonesimuIator/puhuibao.buiId/Objects-normaI/x.„ 
Object file (/Users/sve/Desktop/JLTC/perfectBao/puhuibao/puhuibao/Vender/AIipay/AIipaySDK.framework/AIipaySDK) was built for newer iOS version (7.1) than being linked (7.0) 
O referenced from: 
Obic-class-ref in ContactsViewControIIer.o 
in contactsviewcontroller.o 
O "_OBJC_CLASS_$_EMChatImage", referenced from: 
Obic-class-ref in ChatSendHeIper.o 
(maybe you meant: 
O "_OBJC_CLASS_$_EMChatLocation", referenced from: 
Obic-class-ref in ChatSendHeIper.o 
(maybe you meant: 
O referenced from: 
Obic-class-ref in ChatSendHeIper.o 
Obic-class-ref in CallViewControIIer.o 
(maybe you meant: 
O referenced from: 
Obic-class-ref in ChatViewControIIer.o 
(maybe you meant: 
O "_OBJC_CLASS_$_EMChatVoice", referenced from: 
Obic-class-ref in ChatViewControIIer.o 
O "_OBJC_CLASS_$_EMConversation", referenced from: 
in SDDemandMessageViewControIIer.o 
in ChatListViewControIIer.o 
O referenced from: 
Obic-class-ref in SDDemandSuppIyViewControIIer.o 
O referenced from: 
Obic-class-ref in ChatGroupDetaiIViewControIIer.o 
O "_OBJC_CLASS_$_EMGroupStyIeSetting", referenced from: 
Obic-class-ref in CreateGroupViewControIIer.o 
O referenced from: 
Obic-class-ref in ChatSendHeIper.o 
O "_OBJC_CLASS_$_EMLocationMessageBody", referenced from: 
Obic-class-ref in ChatSendHeIper.o 
O , referenced from: 
Obic-class-ref in ChatSendHeIper.o 
Obic-class-ref in CallViewControIIer.o 
O referenced from: 
Obic-class-ref in RobotManager.o 
(maybe you meant: 
Al 020

    计算机生成了可选文字:
puhuibao 
puhuibao 
AppDeIegate 
Controllers 
Views 
Models 
HMCoreAnimation 
TSManager 
Va Iidationlnput 
SSKeychain 
WPAttributedMarkup 
APAddressBook 
RequestManager 
Category 
Macro 
Vender 
FM Database 
EaseMobSDK 
include 
IibEascModCIicntSDK_a

    ---------------------------------------------------------------------------

    计算机生成了可选文字:
'0110-uuOO'awaouOSJOd 
qs!lqndpuewao 
」 2 一 一 OJWOOObedaWOH 
Olqqnepuewao 
一 一 0 u00 > 3S28 
MOUSPUEWOO A 
290We1e0 
puewaahlddns 「 凵 A 
一 一 0nu00 「 凵 
awbalaoddv 「 凵 
S 」 一 一 0nu00 「 凵 A 
oeqlngnd A 
oeq!nqnd 回

    高德地图聚合

    - (void)mapView:(MAMapView *)mapView regionDidChangeAnimated:(BOOL)animated

    {

        // We add a new operation queue to do the clustering

        [[NSOperationQueue new] addOperationWithBlock:^{

            double scale = self.mapView.bounds.size.width / self.mapView.visibleMapRect.size.width;

            NSArray *annotations = [self.clusteringManager clusteredAnnotationsWithinMapRect:mapView.visibleMapRect withZoomScale:scale];

            

            // The clusteringManager will get the main queue to do the UI stuff.

            [self.clusteringManager displayAnnotations:annotations onMapView:mapView];

        }];

    } // 加上之后不显示大头针了,annotations为空 

    ------------------------------------------------------------------------------------------------------------

    计算机生成了可选文字:
if 
57.7 MB 
81 
82 
83 
86 
( selected) 
if (self. calloutView 
nil 
lone 6 / i0S 9.2 (13C75) 
10:40 AM 
S32 
Construct custom callout. 
self. calloutView = [ [CustomCaUoutView alloc 
n; 
kCalloutHeight 
96@" , self. byContent) ; 
initWithF rame: CGRectMake (O , 
self. calloutView. Lab_Name.text = self .byContent. nickname? : 
self. cat loutView. Lab_Detait. text 
self. cat toutView. Lab_Price. text 
.price] ; 
= self.byContent.name?: 
= [NSString , self. byContent 
weak CustomAnnotationView *bySelf 
= self; 
(NSInteger 
index) { 
self. calloutView.clickBlock = 
bySelf. annotationClick( [NSString 
Thread 1: (code-I, address=Ox10) 
st , bySelf. byContent. resou rceld] ) ; 
puhuiba02 Threadl 2 n O _ 
ox7fd63061c220 
AnnotationView 
45-[CustomAnnotationView 
ype— resu 
xm Ja r 
ver- ' 5ee2d2fb58d78f38abb41ffse4søa7a27a4c6712 ' 
2016-ø1-28 puhuiba0129873:748293] Finished R"uest: 
SDResourceQueryApi 
2016-ø1-28 puhuiba0129873:748293] Request queue size = 
2016-ø1-28 RECV: 
"Ins:' : rang—' 
"Ins:' by n" 
: error* 
2016-01-28 puhuiba0129873:7417] RECV: estren:stree 
2016-ø1-28 (null) 
2016-ø1-28 (null)

    点击任务详情崩溃

    添加下面代码就好了

    SDResourceQueryMode *content = [self.contentData objectAtIndex:[annotation.title integerValue]];

            

            [annotationView makeContent:content WithCustomAnnotationViewClick:^(NSString *resourceID) {

                

                NSString *userID     = [NSString stringWithFormat:@"%@",content.mUserId];

                SDDemandReceiveViewController *demandDetail =

                [[SDDemandReceiveViewController alloc] initWithResourceID:resourceID WithUserID:userID];

                demandDetail.forwardVC = @"mainOrTask";

                [self.navigationController pushViewController:demandDetail animated:YES];

                

            }];

     ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- -------

    // 下面的方法不调用

    NSArray *annotations = [self.clusteringManager clusteredAnnotationsWithinMapRect:mapView.visibleMapRect withZoomScale:1]; // 没有获取到大头针 scale

            NSLog(@"annotations.count%td",annotations.count); // 不调用这个方法

    ---------------------------------------------------------------------------------------------------------

    计算机生成了可选文字:
对 不 起 , 您 输 入 的 码 无 效 。 
请 再 试 一 次 , 输 入 “ anhuigu 。 一 p12 一 123 . p12 ” 的 码 : 
0 显 示 码

    计算机生成了可选文字:
puhuibao c 
Combined 
Basic 
Code Signing 
Setting 
Provisioning Profile 
General 
Capabilities 
Resource Tags 
Resolved 
Build Settings 
Provisioning 
puhuibao 
Automatic 
Build Phases 
puhuibao 
Build Rules 
ios Default 
puhuibaoDeveIopment

    双击就行了

    ------------------------------------------------------------------------------------------------------------------------

    计算机生成了可选文字:
拍 卖 图 片 显 示 
不 了 , 片 太 可 市 
一 、 夯 角 凹 歆 自 治 县 
的 小 图

    ------------------------------------------------------------------------------------------------------------------------

    点击图片跳转到弹出黑色view

    计算机生成了可选文字:

    ------------------------------------------------------------------------------------------------------------------------

    点击图片不能弹出黑色View

    点击后方法不走,被拦截了初始化的时候加上手势就不行了  在适当的位置加下面的代码

    self.portraitImageView.userInteractionEnabled = YES;

            UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(jump)];

            

            [self.portraitImageView addGestureRecognizer:tap];

            return;

    你是如何知道在哪里加这些代码的? 注释掉一部分,再打开一部分

    第一次点击没有跳转,第二次点击才跳转,在设置下标数字的时候添加手势

    - (void)setCount:(NSUInteger)count

    {

        _count = count;

        self.clusterLbl.backgroundColor = [UIColor redColor];

        self.clusterLbl.text = [@(_count) stringValue];

        self.clusterLbl.textAlignment = NSTextAlignmentCenter;

        self.clusterLbl.font = [UIFont systemFontOfSize:15];

        self.clusterLbl.textColor = [UIColor whiteColor];

            

        self.portraitImageView.userInteractionEnabled = YES;

        UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(jump)];

        

        [self.portraitImageView addGestureRecognizer:tap];

    }

    ----------------------------

    拿不到数组,写懒加载就行了,如果不为空直接走掉.打断点,看数组元素的个数,发现的

    ----------------------------

    图片崩溃,数组内容不对,没有获取到正确的模型

    如何知道是哪几个聚合了,拿不到模型

    如何拿到聚合后的模型

    可以知道聚合后的模型数量,如何获得contentData  搞定

    计算机生成了可选文字:
(MAAnnotationCIuster *) 
Ox7fb6eb148540 
NSObject 
- (NSString *) 
_title - 
_subtitle — (NSString * ) 
- (_NSArrayM *) 
_annotations - 
@"2 objects" 
[O] (MAPointAnnotation *) 
Ox7fb6eb218b60 
MAShape 
NSObject 
_title (NSTaggedPointerString *) @ O 
_subtitle = 
Oxo 
[1] (MAPointAnnotation * ) 
Ox7fb6eb195710 
initWithAnnotation: annotat ion 
ID 
euse 
onCl 
trin 
us te 
00 
Iden 
erAn

    for ( MAPointAnnotation *pointAnnotation in ((MAAnnotationCluster *)annotation).annotations) {

                    SDResourceQueryMode *content = [self.contentData objectAtIndex:pointAnnotation.title.intValue];

                    [contentArr addObject:content];

                }

    ------------------------------------------------------------------------------------

    点击cell push到新控制器

    ------------------------------------------------------------------------------------

    Bug:聚合不太灵敏

  • 相关阅读:
    shell编程基础进阶
    Ansible自动化配置详解
    sersync实时同步实战
    NFS网络文件系统详解
    CentOS7下rsync服务的基本详解和使用
    CentOS7版本基础使用
    网络基础-交换机、路由器、OSI7层模型
    linux-sed命令
    Cause: java. lang.InstantiationException: tk.mybatis.mapper.provider.base.BaseInsertProvider
    Spring Boot MyBatis注解:@MapperScan和@Mapper
  • 原文地址:https://www.cnblogs.com/tufei7/p/5191950.html
Copyright © 2020-2023  润新知