Skip to content

Latest commit

 

History

History
100 lines (70 loc) · 5.5 KB

MapplsMapStyle.md

File metadata and controls

100 lines (70 loc) · 5.5 KB

Mappls offers a range of preset styles to rendering the map. The user has to retrieve a list of styles for a specific account. The listing api would help in rendering specific style as well as facilitate the switching of style themes.

From the below reference code it would become quite clear that user has to specify style names and not URLs to use them. A default style is set for all account users to start with. To know more about available styles, kindly contact apisupport@mappls.com

This feature is available from version v5.7.19

Explore and choose from our map style list on Live Demo

Subscribe the delegate to get the list of available styles:

Swift

func didLoadedMapplsMapsStyles(_ mapView: MapplsMapView, styles: [MapplsMapStyle], withError error: Error?)

Objective C

- (void)didLoadedMapplsMapsStyles:(MapplsMapView *)mapView styles:(NSArray<MapplsMapStyle *> *)styles withError:(nullable NSError *)error;

MapplsMapStyle contains below parameters:

  1. style_Description(String): Description of the style
  2. displayName(string): Generic Name of style mostly used in Mappls content.
  3. imageUrl(String): Preview Image of style
  4. name(String): Name of style used to change the style.

To set MapplsMap style reference code is below:

Swift

mapView.setMapplsMapStyle("style Name")

Objective C

[self.mapView setMapplsMapStyle:@"Style Name"];

To enable/disable loading of last selected style:

Swift

MapplsMapConfiguration.setIsShowPreferedMapStyle(false) // true is enable & false is disable(default value is true) 

Objective C

[MapplsMapConfiguration setIsShowPreferedMapStyle:false]; //true is enable & false is disable(default value is true)

Tells the delegate that the style set by user is valid or not.

Swift

func didSetMapplsMapStyle(_ mapView: MapplsMapView, isSuccess: Bool, withError error: Error?)

Objective C

-(void)didSetMapplsMapStyle:(MapplsMapView *)mapView isSuccess:(BOOL)isSuccess withError:(nullable NSError *)error;




Our many happy customers:


For any queries and support, please contact:

Email us at apisupport@mappls.com

Support Need support? contact us!



@ Copyright 2022 CE Info Systems Pvt. Ltd. All Rights Reserved.