Can I use my own tiles in MapKit, instead of Google's? - iphone

I'm currently trying to decide wether to accept a client's proposal or not. Basically, I'm asked to create a MapView that displays markers at several locations on a map, with the additional requirement that the client's own map tiles are used instead of Google Maps'.
I do not know yet how the client stores their own map tiles, but I was assured that I'd be able to convert them into any format I'd need.
Is it possible to use different map tiles in MapKit's MapView?
Do you have good online literature about this? Links please?
If this is possible, I'd propably have to create a server that sends the files to the device.
How hard is it to create such a server? Is it just "setup apache, done." or is there more to it?
How hard, or time-consuming would both these things be, in relation to just setting up a normal MapView?
Thanks for your answers.

You can't use custom tiles with MapKit. You're limited to using the ones provided by Google.
It could be easier to create a "Google Maps-ish" web app that uses the custom titles and can be viewed on the iPhone through UIWebView?

Have you looked at alternate map frameworks on the iPhone? I know there is at least one open source map engine, also with tiles (that are not as good as the Google tiles, but hey).
A decent set of them is here:
Creating an IPhone Map application

The "easiest" way to do this within the Google Map framework is simply to map the client's map as a texture on top of the "ground." You can create textures at different resolutions, for different zoom factors. Then you won't need to do any special coding at all --- everything will just work.
The way you do this is with a KML region that maps to ground level.
See: http://earth.google.com/outreach/tutorial_region.html

Related

MKRoute shown in US only

I use MapManager to show the route. MKroute doesn't work in my country, but it does in US. Can anyone tell me if this only work in only particular countries or it does work everywhere?
The best i can tell is that, for a route, you need a destination and starting point.
When a coordinate preferably the current user position does not have a POI in map mostly due to the fact that apple maps is not completely mapped in your place. By which i mean its besides from showing some main areas and streets, you have nothing other then this feature will not work.
If you know what i mean, then the alternative solution is Google Maps. It has a vast resource and it has information about things apple does not.
But it comes with a price, you need to learn to use Google Maps API which at this point is documented for Objective-C only.
And the callout is somewhat static in Google Maps which you can customize but the hard way.

Symbolizing OpenStreetMap layers in MapBox

Newbie post here, so forgive me if there's a better place for this, or if my question has been answered already.
I am trying to develop an interactive trail map for my town. I have added all of the trails into the OSM database, with good topology and tags for technical difficulty, quality etc:
http://www.openstreetmap.org/#map=16/49.0843/-117.7981
I am looking to develop the map using MapBox and Tilemill. My question is: If my main goal is to symbolize the OSM highway=cycleway features based on their difficulty tags, can I skip the whole tile creation process? If so, how would I go about symbolizing the various trails based on difficulty?
If I'm not interested in a custom basemap, is there any other advantage to using MBTiles? Here is my current working MapBox map, which is using a single MBTile:
http://www.kootenaymaps.ca/wp-content/uploads/2014/03/MapBoxEXAMPLE.html
Thanks in advance for any guidance here...
Barry
I have no experience with Tilemill but AFAIK it is designed to create webmabs on tile base only. So you might use another desktop renderer as Maperitive for example. Please also keep in mind, that there are already various approaches to create hiking maps online, for GPS and printing ;).

TileOverlay on Windows Phone Bing Maps?

For my Windows Phone Mango app, I want to make overlay a heatmap on Bing Maps, and a tile overlay seems the best way to do it. I've been having trouble finding any good documentation or code samples to work from. It seems like most people are pointing the tile source to a web service. I'd rather render the heatmap on the phone itself - is that possible?
One of the main reasons to use tilelayers to represent data on a map is that the computation and rendering involved in creating the layer is performed in advance, generally as a one-off or infrequent task. Then, at runtime, the only work the client needs to do is to retrieve the pre-rendered tile images from the server and display them straight on the map, which is a simple, low-resource activity.
Rendering tiles can be a resource-intensive task, both in terms of processing and memory usage - for example, I can only render about 3 tiles per second on a quadcore desktop machine with 8Gb RAM. Even if it's technically possible to create the tiles dynamically on a handheld device, the performance is almost certainly going to be unacceptable for any user. You've also got the question of how you're going to store the data from which the layer is created. Since you're talking about plotting a heatmap, I'm guessing you have a reasonably large dataset of points - did you envisage these stored locally on the device, or retrieved over the network? (either will create different problems).
Basically, while it may be theoretically possible to create tile layers dynamically on the client, doing so would negate almost any benefit of using tilelayers in the first place, which is why you probably won't find any code samples explaining how to do so. Perhaps you could explain your comment why you'd rather create the heatmap on the phone?
It's pretty easy to create a server-side tile renderer using .NET or PHP that renders and server tile images to a Bing Maps client, or you can use an existing map rendering library such as mapnik.org or geoserver.org.

Indoor map creator

I have designed and developed couple of navigation apps using google API and osmdroid API for android powered devices. Now I am looking to create an Indoor navigation system using osmdroid API. But, in order to do so I need to create tiles similar to regular map tiles from an simple PNG file with naming convention similar to OpenStreetMap.
Please suggest me how to do this?
Cheers,
Susheel
You could design your indoor map using JOSM. Save it to a .osm file. Don't upload the data to OpenStreetMap unless it is a appropriate to do so (OpenStreetMap has some basic some indoor features, e.g. a highway=footway running through a shopping mall, but generally a lot of very detailed indoor stuff will be inappropriate for OSM) But...
With a .osm file you could then use one of the OpenStreetMap rendering tools to create a raster map, and chop it into tiles. For quick satisfaction I'd recommend Maperative, although I'm not sure how easy the last tile chopping step is. I've never done this with Maperative. Mapnik has a nice generate_tiles.py output, which will give you the tileset you want, but it's a bit tricky to set up in the first place.
Actually the last step is the main thing you're asking about. You can chop up any image into tiles. It may or may not be important to you that the tiles are geo-positioned in some meaningful way. For an old project I did a quick fudge solution using google tile cutter script, which is actually a wrapper around GDAL tools.
Have a look at the gdal library, and in particular gdal2tiles. This is a library designed to create maps from raster images, and serves exactly your purpose.
You can decide on a projection and what the bounds of your source image(s) are. The library allows you to reproject your image to the correct coordinate space.
It can also generate tiles at various zoom levels using gdal2tiles, either with or without reprojection.
Now you can check indoor rendering by drag and dropping OSM geojson data into https://app.openindoor.io web page.

Static maps with routing on iOS

Is there a way to have static maps on the iPhone, with either MapKit or a third-party framework? By this I mean fixed area of say, 5 sq miles, which can by zoomed/panned etc, but which doesn't require an internet connection to load the map.
Additionally, is it possible to get route directions, and draw them on the map?
You can of course always roll your own solution with CATiledLayer if the area you want to display is that small, but it's probably better and easier to have a look at routing frameworks like MapBox (http://mapbox.com/blog/introducing-mapbox-ios-sdk/), which provides offline support for iOS.
The MapKit framework doesn't offer offline maps currently.
It is possible to define an area on the maps, and lock the user into that area, but an internet connection is still required.
Maybe a more direct way to do what you want is to download a static image for the zone you are interested in and cache it, using the image of that map area to zoom and pan around in. Of course this would require an initial internet connection but that is really not such an obstacle, after all, one must have a connection to download your application.
You could also provide this image directly into your applications bundle, but you've not really told us much to conclude that the latter option is feasible.
As for routing, it's also not supported currently. You could however retrieve a list of waypoints from point A to B directly from the Google maps remote API - note you cannot do this with MapKit framework.
With these waypoints (which contain coordinates) and the current zoom level value, it's possible for you to plot these points and draw between each one in order to implement your own routing, this get a little ugly or maybe better to say "laggy" when the user begins to zoom in and out as it's only possible to know how to redraw your route when the user ends zooming (lifts their fingers from the screen), but of course like most things in programming, there is a solution to this which is, I feel out of scope for this question.
I hope this helps.