Hello I want to do Pin point's clustering on apple map. What is the possible solutions of it.Now the apple map with one pin point is display on my screen. What is the code after it for Pin point's grouping. Thanks in advance
A possible (and successful, I'm using it at work) solution for clustering/displaying lots of points on a map is
http://robots.thoughtbot.com/how-to-handle-large-amounts-of-data-on-maps
Related
I added two marks on Google maps. Now the two markers are overlapping. I want the selected marker to be always in the front. That means when you select a marker this marker covers another marker. I looked at the Google maps development documentation, which does not provide the relevant API.
How can I do this?
A simple resolution is using the propertie zIndex, just set to 1.
customMark.zIndex = 1
For more informations, you can see https://developers.google.com/maps/documentation/ios-sdk/reference/interface_g_m_s_marker
I need to show an indoor floor plan in a MKMapView. So far I have managed to load custom map tiles into MKMapView. But when I try to show annotations it does not show in correct location. The space between latitudes are not equal. I think it’s because MKMapView maps the globe into flat surface. But in my case I need to show annotations in a flat surface. Any idea how to do this?
EDIT : Anyone know how to convert geographic coordinates to cartesian coordinates? That will solve this problem
Apple just updated its demo project:
https://developer.apple.com/library/prerelease/ios/samplecode/footprint/Introduction/Intro.html
Take a look, there are information about how to translate geolocation (spherical) to flat location.
I'd like to draw a grid into my map, that represents the size of a tile at a certain zoom level. So for example I'd like to have a grid on my mapview that shows the outline of a zoom level 10 tile. So the outline of where this tile would be. No matter if the mapview itself is at zoom level 5 or 15, it should display the outline of where that tile would be placed.
The problem I have is how to calculate the proper rect that represents each visible "tile".
Any help is sooo much appreciated!!!
Or maybe the answer to following question would help:
How can I convert a MKMapRect to a MKTileOverlayPath?
I find that MapKit is way too limited when you want to start doing more and more with maps.
I would reccomend using Google Maps SDK for iOS: https://developers.google.com/maps/documentation/ios/start
and then using GMSTileLayer for the tiles:
https://developers.google.com/maps/documentation/ios/reference/interface_g_m_s_tile_layer
In the long run, replacing MapKit with Google maps gives you far more features and options and has better geolocation and reverse geolocation than Apple
You can also look at Mapbox. Between using TileMill to create a grid layer by setting the Map background to a pattern image, you could then only export zoom level 10 and either host it on Mapbox or export it to MBTiles format (SQLite-based). Then one of the Mapbox mobile toolkits could serve the tiles out as an overlay on your map.
is there any way to determine which type of area you are in from a MKMapView? I.e. if the centre of the map is in the ocean we can tell the user: the centre of the map is above the ocean, or if the map is centred above a green area: the centre of the map is above parkland...
The only way I can think of to do this is to create a screenshot of the visible screen and analyse the colour of each bit by using some method such as this: iOS -- detect the color of a pixel?
However I would be interested to know if there is an easier way that anyone can think of!
EDIT
To make it more clear what I'm looking for, I'm basically looking for a way to turn a section of a map into a top down level for a game, with different areas determined by the areas of the map...
A CLPlacemark has a couple of properties: inlandWater and ocean which tell you when the placemark is in water. I think you can get a placemark from the geocoder.
It also has areasOfInterest which will give you parks and landmarks.
there is no foolproof way BUT CLGeocoder can reverse geocode a coordinate to an address and that would give you stuff like:
0/0 = ...., ocean
51/10 = ..., germany
-90/10 = ..... , united states
and so on
is there any way to determine which type of area you are in from a MKMapView? I.e. if the centre of the map is in the ocean we can tell the user: the centre of the map is above the ocean, or if the map is centred above a green area: the centre of the map is above parkland...
The only way I can think of to do this is to create a screenshot of the visible screen and analyse the colour of each bit by using some method such as this: iOS -- detect the color of a pixel?
However I would be interested to know if there is an easier way that anyone can think of!
EDIT
To make it more clear what I'm looking for, I'm basically looking for a way to turn a section of a map into a top down level for a game, with different areas determined by the areas of the map...
A CLPlacemark has a couple of properties: inlandWater and ocean which tell you when the placemark is in water. I think you can get a placemark from the geocoder.
It also has areasOfInterest which will give you parks and landmarks.
there is no foolproof way BUT CLGeocoder can reverse geocode a coordinate to an address and that would give you stuff like:
0/0 = ...., ocean
51/10 = ..., germany
-90/10 = ..... , united states
and so on