</pre><pre>
YourUIAnnotationView
is
always drawn at the same scale, the map's zoom level doesn't matter. That's whycenterOffset
isn't
bound with the zoom level.
annView.centerOffset
is
what you need. If you see that your pin is not at the good location (for example, the bottom center move a little when you change the zoom level), it's because you didn't set the right centerOffset.
By the way, if you want to set the point of the coordinate at the bottom center of the image, the x coordinate of your centerOffset should be 0.0f, as annotationView center the image by default. So try :
annView.centerOffset = CGPointMake(0, -imageHeight / 2);
或是
Setting the centerOffset often moves the image arround when user rotates or zooms the map, as anchor point is still set to the center of the image instead of its lower center.
You can set the anchor point of the annotation to the bottom center of you custom image as follows:
yourAnnotation.layer.anchorPoint = CGPointMake(0.5f, 1.0f);
This way when user zooms or rotates the map your custom annotation will never move from its coordinates on the map.
http://stackoverflow.com/questions/8165262/mkannotation-image-offset-with-custom-pin-image
分享到:
相关推荐
Image-to-Image Translation with Conditional Adversarial Networks.pdf
Image Processing with ImageJ
custom image files explorer
CVPR 2022 Image Dehazing Transformer with Transmission-Aware 3D Position Embedding 源代码,很有学习价值,大佬任文琦团队的最新去雾杰作,从3D定位的角度去思考去雾。CVPR 2022 Image Dehazing Transformer ...
Image Processing with ImageJ, 2nd Edition
2020CVPR顶会图像去雾论文源码-Distilling Image Dehazing With Heterogeneous Task Imitation论文源码
Multi-focus image fusion with a deep convolutional neural network的源码
This document describes how to create, test and configure a Linux image with Custom IP UIO Driver using PetaLinux 2014.4 on Ubuntu 14.04 LTS (64-bit). Ubunto 14.04 LTS (64-bit) Guest is running Oracle...
Natural image stitching with the global similarity prior[C]//Proceedings of the 14th European Conference on European Conference on Computer Vision. Amsterdam,Netherlands: Springer,2016: 186-201...
Image Fusion With Convolutional Sparse Representation一文
Large-Scale Image Retrieval with Attentive Deep Local Features Large-Scale Image Retrieval with Attentive Deep Local Features Large-Scale Image Retrieval with Attentive Deep Local Features Large-Scale...
Learning Image Processing with OpenCV 英文原版pdf 及配套Code源码 本资源来自自网络,如有侵权,请联系上传者或csdn删除
image processing with labview and imaq vision3
Paperback: 256 pages Publisher: Packt Publishing - ebooks Account; 2nd Revised edition edition (November 30, 2015) Language: English ISBN-10: 1785889834 ISBN-13: 978-1785889837
image processing with labview and imaq vision4
image processing with labview and imaq vision5
A fresh 3D image slider with graceful fallback
Multi-focus image fusion with dense SIFT一文的文章,很不错,值得学习
基于边界限制的去雾方法,与传统的暗原色不同,效果很好,大家可以和何凯明的方法对比