i want to load my own map based on current location , lets say i have all the images based on zoom level
like zoom=16 (then all images of 16) , zoom=14(all images of 14 levl)
But how to load these maps based on location , i mean how to get notified so that i can load images???
I believe this might be exactly what you need: Route Me, an iOS map library for performing the standard UIMapView types of things with your own maps.
Related
We use the skmaps's(Skobbler) SDK in android and IOS,
Our function is to show one pin in skmaps, the other settings is default.
We can show the map on both android and IOS,
but the loading time is too long, it takes about 5~15 seconds.
I've been trying different Wifi network and different device(iphone 6s plus and HTC M9), but it's still slow.
Can anyone help me?
The SDK doesn’t seem to be slow at rendering.
So check the downloading process for the requested vector tiles.
How to improve it:
reduce the requested area - increase the zoom level so that as soon as some vector data becomes available something will get rendered (i.e. set the zoom level to 18 or 17)
reduce the size of the requested vector tiles - switch to using LightMaps (initMapSettings.setMapDetailLevel(SKMapsInitSetti ngs.SK_MAP_DETAIL_LIGHT) - the light maps contain fewer elements and thus are smaller and will be rendered faster
don't use pannable maps but use static maps when displaying the location of a certain POI - for this exact use case, showing a mini map associated with a POI most products use a static map (fixed png/jpg) as it renders instantly. This is especially relevant in scenarios when the POIs are in different parts of the world
I have a list of 15k I need to display on a MKMapView embedded in my app.
I think this is probably too many to load at once, and I want to check if there is a standard way to do this. The XML file with the informations about the pins is stored on a webserver.
I think I have a few options, but still I'm not sure where the bottleneck would be (network, displaying many pins at once, loading the pins on the map the first time, etc):
Parse the whole xml file and add all the annotations. Force the user zoom so you can't see too many pins together
Parse the whole xml file and add all the annotations. Use a library for grouping the Pins.
Load only the top 50 pins in the area the user is currently in. Everytime the position is updated call a script on the webserver that only serves 50 positions based on map latitude-longitute and zooming.
Cache everything in coredata and do the same as the previous point.
Any considerations about performances I should do? Any other solutions? Will these perform well enough?
Thanks!
The bottleneck will be displaying that many pins at one time on the map. You shouldn't display more than around 500 at one time. Zoomed in might be OK, but zoomed out will affect performance and map visibility.
Here's a library that will do clustering for you:
http://applidium.com/en/news/too_many_pins_on_your_map/
I'm in the process of making an iPhone App that can show nearby stores (the stores are a danish grocerychain of stores). In the app. I want to switch to a view where the standard iphone map is shown and I know how to make that and a pointer of my location.
Now i have a list of all the addresses of the stores. But i don't know how to make the map automatically show for example 4 or 5 of the nearest stores of my current location.
Also I would really like that when the map launches it doesn't show the entire world but it automatically zooms in on my current location in a decent way :)
I hope someone will help. I would really appreciate it :)
What you want is not as simple as flipping a switch, but it can certainly be done:
Fetch the list of nearby store locations based on the current location of the device. Use Core Location to get the current device location and then fetch the nearby stores from either a file within the app bundle or from somewhere on the web
Display the stores on a map provided by MapKit using annotations. To make sure only a relevant part of the map is show use the setRegion:animated: method of MKMapView
How to Display offline map in iphone using mapkit?
if i use static image then how do i get current location and pin drop on it?
anyone has idea please suggest some solution.
Thank you.
Try this post Force MapKit use cached map tiles only/disable network programmatically
It tells about open source map OSM , helps offline map browsing.
Source from here http://developers.cloudmade.com/projects/show/iphone-sdk.
Hope this helps , or r u looking for some thing else.
Similar to What SDKs can be used for creating offline maps application for iPad/iPhone?
In iOS4+, you can use an image MKOverlay to overlay whatever you want on top of a MapKit map. You can provide a semi-transperant base map of your own providing to display when the underlying Google Map can not be loaded. But you can not control what MapKit is doing under the hood caching Google maps.
I'm with building a map application for iPhone, and I wanted to ask what the best way is for bringing maps from a website onto the iPhone.
I want to fetch small images of size 80x80 and show them. This kind of activity might be achieved by using UIKit or OpenGL ES.
Also if you can bring to my notice some kind of achievement and guides for this thing, I would be really very thankful.
EDIT:
I need to get the custom maps for some other vendor..
Besides that i know how to get the images its the rendering part and displaying part that what my problem man.
For small static maps, you could use Google's static map API
You can construct a URL to get your image like this:
NSString* urlString = [NSString stringWithFormat:#"http://maps.google.com/staticmap?center=%f,%f&zoom=%d&size=%1.0fx%1.0f&key=%s&sensor=true",
aLocation.coordinate.latitude, aLocation.coordinate.longitude, // aLocation is set to the center of the map
kCardBackGoogleMapsZoomLevelDefault,
80, 80, // your map size
kAIGoogleMapAPIKey]; // your google maps API key
All the other maps suppliers support static tiles - Microsoft, Yahoo and CloudMade.
Take a look at this topic: http://discussions.apple.com/message.jspa?messageID=8157498. It's nearly the same as what you're asking for.
As far as displaying the scrolling map is concerned, CATiledLayer would be the way to go. It's a slightly complex class to use, but you can find some examples if you google it.
Would you be able to use iPhone SDK 3's MapKit API, or do you need to use custom maps?
If you have a set of custom tiles you want to load, you may want to look at mapping engines put together by companies like MapNinja that let you use your own tilesets.
Otherwise it's a lot of coding to do something like a tiled map engine yourself.
If you're looking to just embed a single, non scrollable map, then have a look at the Google Static Maps API, which will generate map images for you on the fly, depending on your request parameters.
If you want to implement a slippy map, then either try route-me, which works with OS 2.2.1, and supports custom tile servers. Or have a look at MapKit/Google Maps in OS 3.0.
You could also use the Route-Me project
http://code.google.com/p/route-me/
BSD Licensed - perfect if you need to render your own tiles