Remove only restaurants from MKMapView - ios

I'd like my MKMapView to show points of interest except restaurants. Is this possible, and if yes, how can I set this up?
I did see the below in the Documentation but is it really all or nothing?
#property (nonatomic) BOOL showsPointsOfInterest;
When this property is set to YES, the map displays icons and labels for restaurants, schools, and other relevant points of interest. The default value of this property is YES.
For example, in the below, I want the gas station to show but not the restaurant.

With IOS 13 you have the option to filter: here a example to show no items on the map
localMap.pointOfInterestFilter = .some(MKPointOfInterestFilter(including: []))
For example you can filter airports out of the map...
localMap.pointOfInterestFilter = .some(MKPointOfInterestFilter(including: [MKPointOfInterestCategory.airport]))

It's not possible to control the specific type of points that are plotted. Apple could add/remove/change the specific types it displays in any future update of Map Kit. As you mentioned, your only course of action is setting showsPointsOfInterest.
You could use a third-party place database from Foursquare or Facebook to get similar points of interest and plot them on your map, however there is no guarantee that the results would match the ones Apple would otherwise show.

Another option in iOS 13 is to include or exclude certain points of interest:
// Includes airports
localMap.pointOfInterestFilter?.includes(MKPointOfInterestCategory.airport)
// Excludes laundry/laundromats
localMap.pointOfInterestFilter?.excludes(MKPointOfInterestCategory.laundry)

Related

Spotfire Map Multiple Values in same geo code

Im drawing a simple map in spotfire using US cities as geo location. The values I want to show on the map is the location of 'specific gas stations' by the geo code.
For larger cities there are many but im only able to get one 'shape'. I can work on the coloring or size. But im interested to get all 5 dots next to each other or a call-out highlighting there are five..?
Is there a way to show all values, or does spotfire need to combine them?
I know I can get more details with lat/long but that is not an option.
are your shapes literally being combined? that shouldn't happen unless you are doing a "Marker by: City". double check this setting.
if they aren't being literally combined into one point on the map, but instead they are sitting on top of each other, you could adjust the jitter settings on your Marker Layer (check the Appearance page in the Properties dialog) to spread them out a little bit.
if that doesn't suit your needs, and the former case is true, please update your question with some screencaps of your map chart's configuration and I'll see if I can provide a better answer :)

Can we add multiple values on balloon marker with image in ios-charts?

I am using ios-charts and i added one value to balloon marker,
now i wish to add two values in two line in balloon marker and also wants to add two dots before that two values, i have implemented it in objective c.
I want to change balloon marker font color as well
So is it possible to implement in iOS charts ?
I would say it's definitely possible, but how easily you can do it is what you need to think about.
Balloon marker is just a example of how to use ChartMakrer. You can of course sub class ChartMarker and make your own.
I would consider render all your values and dots into one image, and assign it to ChartMarker's image property.

Algolia: Search multiple geos simultaneously?

Is there any way to search for items within distance of a lat/long for multiple lat/longs simultaneously? E.g., to say "give me all results within 10 miles of 14.2342,-13.234234 AND 1.3234,4.56775"?
I currently only see the ability to search one set of coordinates at a time.
In its current version, the API only allows to pass one lat/long value at a time.
Nevertheless, it allows to pass multiple bounding boxes at the same time. That means that you could easily calculate the bounding boxe coordinates (see How to calculate the bounding box for a given lat/lng location?), and pass those to the search parameters.
You can find here https://www.algolia.com/doc/tutorials/geo-search a guide (+ sample code) showing how Geoloc search works. And more detail about the boundingBox parameters at https://www.algolia.com/doc/rest#param-insideBoundingBox

How to explicitly set marker IDs

I want to set IDs of the markers that I show on the map. For instance, when I show four markers, I want to give them IDs 10, 20, 30 and 40 explicitly. Now they get m0, m1, m2 and m3. By the way, I need this so that when I click on the Info Window of any of these markers, I get the ID and know which marker's Info Window is clicked and that way I can use that ID (e.g. show it in a toast message for now).
Thanks.
Ahmed
You can not set the marker-IDs on your own. But the method addMarker returns the marker with its ID set.
When later on the marker is clicked, the ID will be the same.
So you need to keep track of the IDs and the corresponding objects the markers stand for on your own e.g. by maintaining a map of marker IDs and objects, where you add a new item after each call of addMarker.

Getting Polygons to display multiple variables using a stripped color scheme in ArcMap

I am creating a map in which i want a polygon to display two separate variables within it. Therefore I want a stripped polygon relating to both the keys from the separate factors however I have no idea on how to do this. I messed around with multiple attributes on the properties section and could get the two variables up however could see no way of making the polygon display them both.
Thank you, any help would be appreciated
This is partially manual, but you are going to have to make a separate category within one of the fields that identifies the multivariate features. You could also create a new layer that is a selection of these features. Once you have that, go to the layer properties and display the features as 'Categories - Unique values, many fields' and hit the 'Add All Values' button. Once the categories are populated select the one you are interested in and pick a hatched symbol such as 'Radiation Overlay'. Then go to the Symbol Property Editor (double-click the symbol) and modify the two layers that make up the hatched symbol. You need to adjust the color, line thickness, offset, etc. until you get it to look the way you want. Probably not as auto as you wanted, but it will satisfy display purposes.

Resources