Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
597 views
in Technique[技术] by (71.8m points)

objective c - MKMapKit Scale for Printing

I'm using MKMapKit in a MacOS application to show the Apple Maps, and I do not seem to be able to find any way to actually set the scale of the map itself for output purposes. I might be thinking old school here, but I want to be able to output a TIFF file with a fixed resolution; for example, 16"x20" at 300DPI. However, MkMapSnapshotter and NSImage seem to be conspiring against me. NSImage doubles the representation it delivers since I'm running on a retina Mac and it states that it thinks in points rather than pixels, which of course. So, I can just compensate for that, but the snapshotted code seems to scale the map way smaller in feature size; roads, names, annotations, etc. are all way too small. It seems like I'm missing a control here that would allow me to set the scale of the map itself when it is snapshotted. If I scale the NSImage down in size, everything looks ok but the resolution in final pixels is too small.

Does anyone have any helpful hints for me?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...