iOS - Nearby Places on Google Maps - ios

I am working on a feature of my app that lets the user search for nearby pharmacies. I am trying to keep things simple and i would like to display the standard places icons and labels which are shown on google maps app. I searched extensively but i haven't found a way to do it. Is there a way to display all the pharmacies as standard ?
Currently i created a GMSMarker for every pharmacy found on a radius of 5km with custom icons and a custom label for the title. But i ran into issues when zooming out, the icons and titles keep their size and overlap.

You can assign position for the markers, so that it will be shown till there
GMSMarker *marker = [GMSMarker markerWithPosition:position];
Hope this works for you.

Related

How can I select nearby search results when using Google Maps SDK for iOS

I am building an iOS map with local search functionality similar to Yelp.
The user will see a local map generated from Google Maps SDK from iOS, and local points of interest returned by the search, will be displayed on the map as custom markers. Simultaneously, the user can also see these same local search results in a list form on another screen.
My issue is as follows: to optimize loading time, I would like the app to load only the search results within the area displayed by the map, given the coordinates of the center of the map, and the zoom level. This would be more efficient than loading, say, all search results within a 30 km radius, most of which may not be visible on the map. Is there a simple way to know exactly what are the coordinates of the area displayed by the map on the user's phone (bottom left corner, top right corner)?
I have seen other posts online, explaining how the coordinates of the area can be calculated using zoom level, latitude, and screen resolution. However I am wondering if there is a simpler way commonly used by other apps that display local points of interest.
Thank you!

iOS Google maps dynamically update/remove programmatically created markers

I am stuck with some lack of xcode / iOS programming knowledge.
I have created a track in google maps for iOS, and programmatically created markers along this track. What I would like to do is update these markers with actual information in the .title / .snippet (ie. distance to go, time to go etc) or remove them all together.
But when you create markers in a loop there is no way of keeping track of them.
since the amount of markers can vary from 2 to 50 it would be strange in my opinion to create 50 different variables for each marker, I guess there must be another way?
You can keeping track of created markers.
Each GMSMarker has property userData. You can add some string tag or other custom object to identify this marker.
e.g.
marker.userData = #{#"key" : #"some tag"};

How to configure the zoom level in the Map?

I'm developing a BlackBerry 10 mobile application using the Momentics IDE (native SDK).
I want to display a map using the mapview qml element which seems that it belongs to the blackberry team (it's not a google map). [ Blackberry 10 mapview ]
All I want is to configure the zoom level like google do, but it looks like the blackberry map doesn't have any attribute which can guarantee that except the "altitude" element which can assign some sort of zoom .
Any one can help on this ?
The altitude property is indeed the one you use for zooming. The paradigm is "how much area is viewable from a given altitude?"
To zoom in and zoom out from the map uses the altitude property.
To create zoom in/out animation you can use a simple javascript function that manages the animation. (For example implementing Elastic or Circular animation. See the Blackberry Stock Curves documentation for more details).
Instead, if you want determinate the viewable area from a given altitude you should work with the map scale
http://www.geog.ucsb.edu/~jeff/115a/lectures/scale_and_area_measurement.html
regards

Adding Multiple Markers To Google Map on iPhone app

I am writing an iPhone application that uses google maps SDK to display a city. I need to add multiple markers on the map to identify certain locations.
I could loop through and add each marker upon the map load, but I don't believe this is a efficient technique(it seems very unnecessarily and resource heavy!!)?
Or is there some "Lazy loading" technique I could use to pull in the markers that are currently in view?
For that you can add it in map region wise, you have to add marker only for current displaying map region, but for this also you need to run loop.
So you can avoid other markers that would added to map.

Google Maps for iOS SDK Marker Order (stacking) + Ground Anchor problems

Anyone figured out yet any way to control the z-order for GMSMarker markers in the Google Maps for iOS SDK? My maps look great, but I have a bad feeling that this functionality isn't supported yet...
I dug through the header files a little, hoping for some undocumented goodies... and poked through the debugger a little. Nada.
Also: I'm using marker.groundAnchor (a CGPoint property of MKMarker) to handle the fact that my custom marker images have offset ground anchors. This works great, but with the side effect that their location appears to be offset! In other words: if you place an image with a non-centered ground anchor, and don't set groundAnchor, the marker will appear to move as the map is zoomed. This is expected. However, if you do set the groundAnchor property the image will appear properly locked in place on the ground... but is now offset substantially from where it is supposed to be! I think this is a bug.
The Z-index feature is part of the google maps sdk for ios Version 1.4.0 - July 2013
Features list mentions:
Added a zIndex property on all overlays. Z-Indexes are calculated in two groups: GMSMarkers and all other overlays.

Resources