How can I make a preview icon like in the iPhone Map application?
Screenshot http://img835.imageshack.us/img835/1619/img0016x.png
Is there a function for this?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
In iOS 7 use MKMapSnapshotter. From NSHipster:
Before iOS7 do one of the following:
Apple’s deal with Google is more reliable than a free API, but on the bright side, it is really simple. Documentation is at http://code.google.com/apis/maps/documentation/staticmaps/
This is the minimum amount of parameters for practical use:
http://maps.googleapis.com/maps/api/staticmap?center=40.416878,-3.703530&zoom=15&size=290×179&sensor=false
A summary of the parameters:
center: this can be an address, or a latitude,longitude pair with up to 6 decimals (more than 6 are ignored).format: png8 (default), png24, git, jpg, jpg-baseline.language: Use any language. Default will be used if requested wasn’t available.maptype: One of the following: roadmap, satellite, hybrid, terrain.scale: 1,2,4. Use 2 to return twice the amount of pixels on retina displays. 4 is restricted to premium customers.Non paid resolution limits are 640×640 for 1 and 2.
sensor: true or false. Mandatory. It indicates if the user is being located using a device.size: size in pixels.zoom: 0 (whole planet) to 21.There is a few more to add polygons, custom markers, and style the map.