Can someone help me or guide me to show clear static image of open street map.
I am using following code.
http://staticmap.openstreetmap.de/staticmap.php?center=40,-50&zoom=2&size=500x350
You have to customize the rendering of OpenStreetMap data if you don't like that rendering.
For example you could design the map as your client likes with Tilemill (https://www.mapbox.com/tilemill/) and then use MapBox APIs (https://www.mapbox.com/blog/mapbox-static-api/).
If you only need an image, Tilemill can export directly a static image.
If you want a custom font on your map you'll have to go a commercial provider Tilemill or MapCreator (2 of the most popular)
As a side note: both offer retina ready static maps (so that the fonts will look good also on retina/xxhdpi devices)
Related
I'm trying to extract static maps using Mapbox's Static Images API. The goal is to embed these images into an HTML page/email etc. Here is a sample that I was able to generate successfully which is at zoom level 13 using custom styles I built on Mapbox Studio:
However, I need a similar static map that could be similarly extracted from Mapox's Static Image API in a clustered view when zoomed out. I've found that Mapbox doesn't support clustering via Mapbox studio (styles) so I'm running out of options on how to achieve this. I was able to come up with the below-clustered view (screenshot) using Html/javascript but then again, can't seem to figure how to retrieve a static image out of it:
Static Image API playground - https://docs.mapbox.com/playground/static/
i'm developping an app using leaflet. I need to have some map datas offline on my device.
To do that i have tried to download some tiles of openstreetmap.
I'm wondering if there is a simple way to create Raster images of my zones, and how i can add them on leaflet.
Thanks.
Depending on you requirements, it might be a lot of data (the whole OpenStreetmap tileset would consume 54TB disk space).
Leaflet.TileLayer.PouchDBCached/ might be a solution for you, this question has some notes on a different implementation.
You can always refer to loading and displaying a single image over specific bounds of the map, georeference specific image using example code
Example 1:
var imageUrl = 'http://www.lib.utexas.edu/maps/historical/newark_nj_1922.jpg',
imageBounds = [[40.712216, -74.22655], [40.773941, -74.12544]];
L.imageOverlay(imageUrl, imageBounds).addTo(map);
Full resource can be find here:
http://leafletjs.com/reference.html#imageoverlay
Example 2:
Or something little more robust from this great and detailed step by step tutorial:
http://build-failed.blogspot.hr/2012/11/zoomable-image-with-leaflet.html
Hope it helps
I want to create a customize map using by openlayer.But I am unable to use openlayer. I want to create map without using google map in iphone so I want to use other way in which I can fill own data in map. i think it possible by open layer , but how I dont know.So please help me.
OpenLayers is a javascript library. As a client-based map viewing utility it allows to "display map tiles, vector data and markers loaded from any source". It is similar to Leaflet.
Both of them are only helpful if you want to render on the web (in which case you would need to grab map tiles or a map image from somewhere (OpenStreetMap for instance), or set up your own map server).
If what you want is to render a map natively on iOS, then you'll probably need a toolkit to fetch and render the map tiles or image. Here're a few that could be helpful:
WhirlyGlobe-Maply;
tangram-es;
GLMap;
Mapzen iOS SDK;
Nutiteq SDK;
Mapbox iOS SDK
QuartzMaps;
you can use this by help of phonegap.
if you dont want to use phonegap then you can simply use UIWebView for that.you can load your data in it.
load HTML files in UIWebView. html file including javascript and css and image files without any problem.
NSString *fullPath = [NSBundle pathForResource:#"filename" ofType:#"html" inDirectory:path];
[yourWebView loadRequest:[NSURLRequest requestWithURL:[NSURL fileURLWithPath:fullPath]]];
for more info on openLayers
It sounds like you are simply interested in providing custom maps in an iOS app. If that is so then MapBox-iOS-SDK will allow you to use many different map sources without the need for a web view. If you look at the MapBox projects on github they also have tools to help you create the maps that the SDK can use.
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