Welcome toVigges Developer Community-Open, Learning,Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
554 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 Answer

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

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to Vigges Developer Community for programmer and developer-Open, Learning and Share
...