2

I have been assigned a task to help build a mobile app, which only shows terrain view of map with a fixed (min/max) zoom level based on mobile phone position and moveable markers which are provided by our server in json format (vector with speed, directions, etc) .

Since I haven't a big experience dealing with GIS data, how could I serve the tiled images to client without having to query a 3rd party service?

I only need the static images plus a custom json to client, should i build a server or use a 3rd party service(gmap,etc).

Given the amount of expected load and the restrictions set by 3rd party services on limitation of storing or even caching data on local machines is what i try to avoid. Contribution to the 3rd party such as a Google map is something I personally dislike, OpenStreetMap though is better from my point of view.

Example

I have the London Territory which it isn't required to maximize Zoom, need to serve its Terrain point of view, based on OSM data for highways/rivers etc, a special json is generated from server-side which both tiles+custom json are supposed to be delivered to client, in order to sync and present a response to clients action.

Since it rather unlikely for the terrain view (tile) to change for like the next year, and I can't cache from 3rd parties, how can I serve this?


Conclusion just for the record

Well after a review and research we decided to go with Leaflet at client side since it looks mature, build our tilesets with TileMill and serve PNGs.

The application will use own tiles for rendering terrain view of major cities, with availability for zoom (at fixed levels) , if any user wants to view other cities the application will try to connect to server and start caching tiles that it receives, but in favor of NOT consuming all of phone memory or ram, it will limit its caching on <100MB (guess that is enough).

3 Answers 3

2

You can try the mapbox terrain views also mapbox.js for mobile app and Mobile SDK for iOS

3
  • Although this answer isn't very thorough, this is the best answer in my view. Make the tiles with mapbox.com/tilemill TileMill. Then upload them to MapBox, then use the SDK to build the app and point at the server URL you make. You can probably just hardcode the tiles in the app with a file from TileMill, but using a server, and downloading a cache means you can change them easier later.
    – Alex Leith
    Aug 25, 2013 at 4:20
  • i reviewed tilemill, and its an excellent, modern tool, that i will be using, although the mapbox & SDK are open, i'll just avoid them, if i don't the whole app will seem like an "advertising app" for mapbox.
    – Gntem
    Aug 25, 2013 at 5:14
  • 1
    Advertising for mapbox or not is your choice. I would definately advertise/support #mapbox for providing these helpful services.
    – neogeomat
    Aug 25, 2013 at 11:03
2
+50

You could use OpenLayers to handle both the plotting of your vector data and also use the the OpenLayers.Layer.Image to "ship" the tile for the area statically with the app. Which would allow you to update the image for the area programatically instead of using GIS tools.

This may seem like an overly simple solution but I would allow you to minimized third party tiles completely, and would allow for updates to that base imagery whenever you want with an app update of just the image file itself.

3
  • You could also lock down the viewing area to the just below the max extents of the imagery you are using so that the app would feel very targeted to the location. Aug 23, 2013 at 17:11
  • Choosed this because of the simplicity that it has, in the end the app will serve major cities terrain view at certain zoom levels, if the user wants to see something other than his/her city then the application will connect to server, and updating a city or cities already in phone memory won't be a pain with the client just checking once a month or so for new updates.
    – Gntem
    Aug 25, 2013 at 5:11
  • If the implementation is slow on the images on different devices you may want to disable the Ztransform that openlayers uses on the image. You also may want to consider setting up your imagery/topos in a TMS fashion, which would allow you to store your maps in a more structured way and allow you to add higher resolution tiles arbitrarily to a file structure vice changing the image layer progromatically. After thinking about it some more the TMS route would be the best solution. You would not need a request handler as the location of the tiles is the structure. Sep 5, 2013 at 15:06
1

a tiling scheme like TMS is just a way of storing image in a predefined directory structure, any webserver kan provide access to this tile cache, you only need some piece of software to generate a tileset, but that can be done using a desktop tool (Tilemill comes to mind). The client should be able to figure out which tiles (==images) to retrieve from the web. Depending on client capabilities you can even store the tiles locally on the client, optionally in an mbtiles format.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.