MapplsMap 5.13.16

MapplsMap 5.13.16

Maintained by MapmyIndia, MapmyIndia, MapmyIndia, MapmyIndia.




MapplsMap 5.13.16

{"payload":{"allShortcutsEnabled":false,"fileTree":{"docs/v1.0.14":{"items":[{"name":"CHANGELOG","path":"docs/v1.0.14/CHANGELOG","contentType":"directory"},{"name":"InteractiveLayers.md","path":"docs/v1.0.14/InteractiveLayers.md","contentType":"file"},{"name":"MapplsAPICore.md","path":"docs/v1.0.14/MapplsAPICore.md","contentType":"file"},{"name":"MapplsAPIKit.md","path":"docs/v1.0.14/MapplsAPIKit.md","contentType":"file"},{"name":"MapplsAnnotationExtension.md","path":"docs/v1.0.14/MapplsAnnotationExtension.md","contentType":"file"},{"name":"MapplsDirectionUI.md","path":"docs/v1.0.14/MapplsDirectionUI.md","contentType":"file"},{"name":"MapplsDrivingRangePlugin.md","path":"docs/v1.0.14/MapplsDrivingRangePlugin.md","contentType":"file"},{"name":"MapplsFeedbackKit.md","path":"docs/v1.0.14/MapplsFeedbackKit.md","contentType":"file"},{"name":"MapplsFeedbackUIKit.md","path":"docs/v1.0.14/MapplsFeedbackUIKit.md","contentType":"file"},{"name":"MapplsGeoanalytics.md","path":"docs/v1.0.14/MapplsGeoanalytics.md","contentType":"file"},{"name":"MapplsGeofenceUI.md","path":"docs/v1.0.14/MapplsGeofenceUI.md","contentType":"file"},{"name":"MapplsIntouch.md","path":"docs/v1.0.14/MapplsIntouch.md","contentType":"file"},{"name":"MapplsMap.md","path":"docs/v1.0.14/MapplsMap.md","contentType":"file"},{"name":"MapplsMapStyle.md","path":"docs/v1.0.14/MapplsMapStyle.md","contentType":"file"},{"name":"MapplsNearbyUI.md","path":"docs/v1.0.14/MapplsNearbyUI.md","contentType":"file"},{"name":"MapplsPinStrategy.md","path":"docs/v1.0.14/MapplsPinStrategy.md","contentType":"file"},{"name":"MapplsTrafficVectorTileOverlay.md","path":"docs/v1.0.14/MapplsTrafficVectorTileOverlay.md","contentType":"file"},{"name":"MapplsUIWidgets.md","path":"docs/v1.0.14/MapplsUIWidgets.md","contentType":"file"},{"name":"Predictive-Route-APIs.md","path":"docs/v1.0.14/Predictive-Route-APIs.md","contentType":"file"},{"name":"README.md","path":"docs/v1.0.14/README.md","contentType":"file"},{"name":"RasterCatalouge.md","path":"docs/v1.0.14/RasterCatalouge.md","contentType":"file"},{"name":"Regions.md","path":"docs/v1.0.14/Regions.md","contentType":"file"}],"totalCount":22},"docs":{"items":[{"name":"v1.0.0","path":"docs/v1.0.0","contentType":"directory"},{"name":"v1.0.1","path":"docs/v1.0.1","contentType":"directory"},{"name":"v1.0.10","path":"docs/v1.0.10","contentType":"directory"},{"name":"v1.0.11","path":"docs/v1.0.11","contentType":"directory"},{"name":"v1.0.12","path":"docs/v1.0.12","contentType":"directory"},{"name":"v1.0.13","path":"docs/v1.0.13","contentType":"directory"},{"name":"v1.0.14","path":"docs/v1.0.14","contentType":"directory"},{"name":"v1.0.2","path":"docs/v1.0.2","contentType":"directory"},{"name":"v1.0.3","path":"docs/v1.0.3","contentType":"directory"},{"name":"v1.0.4","path":"docs/v1.0.4","contentType":"directory"},{"name":"v1.0.5","path":"docs/v1.0.5","contentType":"directory"},{"name":"v1.0.6","path":"docs/v1.0.6","contentType":"directory"},{"name":"v1.0.7","path":"docs/v1.0.7","contentType":"directory"},{"name":"v1.0.8","path":"docs/v1.0.8","contentType":"directory"},{"name":"v1.0.9","path":"docs/v1.0.9","contentType":"directory"}],"totalCount":15},"":{"items":[{"name":"MapplsSDKDemo.xcodeproj","path":"MapplsSDKDemo.xcodeproj","contentType":"directory"},{"name":"MapplsSDKDemo","path":"MapplsSDKDemo","contentType":"directory"},{"name":"docs","path":"docs","contentType":"directory"},{"name":"LICENSE.md","path":"LICENSE.md","contentType":"file"},{"name":"Mappls.podspec","path":"Mappls.podspec","contentType":"file"},{"name":"Podfile","path":"Podfile","contentType":"file"},{"name":"README.md","path":"README.md","contentType":"file"},{"name":"Version-History.md","path":"Version-History.md","contentType":"file"}],"totalCount":8}},"fileTreeProcessingTime":5.473671,"foldersToFetch":[],"reducedMotionEnabled":null,"repo":{"id":491393896,"defaultBranch":"main","name":"mappls-ios-sdk","ownerLogin":"mappls-api","currentUserCanPush":false,"isFork":false,"isEmpty":false,"createdAt":"2022-05-12T06:38:36.000Z","ownerAvatar":"https://avatars.githubusercontent.com/u/98086022?v=4","public":true,"private":false,"isOrgOwned":true},"symbolsExpanded":false,"treeExpanded":true,"refInfo":{"name":"main","listCacheKey":"v0:1688030274.0","canEdit":false,"refType":"branch","currentOid":"b20e647218d1b067f956afb0c93101c1af9d57fe"},"path":"docs/v1.0.14/MapplsMap.md","currentUser":null,"blob":{"rawLines":null,"stylingDirectives":null,"csv":null,"csvError":null,"dependabotInfo":{"showConfigurationBanner":false,"configFilePath":null,"networkDependabotPath":"/mappls-api/mappls-ios-sdk/network/updates","dismissConfigurationNoticePath":"/settings/dismiss-notice/dependabot_configuration_notice","configurationNoticeDismissed":null,"repoAlertsPath":"/mappls-api/mappls-ios-sdk/security/dependabot","repoSecurityAndAnalysisPath":"/mappls-api/mappls-ios-sdk/settings/security_analysis","repoOwnerIsOrg":true,"currentUserCanAdminRepo":false},"displayName":"MapplsMap.md","displayUrl":"https://github.com/mappls-api/mappls-ios-sdk/blob/main/docs/v1.0.14/MapplsMap.md?raw=true","headerInfo":{"blobSize":"35.9 KB","deleteInfo":{"deleteTooltip":"You must be signed in to make or propose changes"},"editInfo":{"editTooltip":"You must be signed in to make or propose changes"},"ghDesktopPath":"https://desktop.github.com","gitLfsPath":null,"onBranch":true,"shortPath":"2f1ce3f","siteNavLoginPath":"/login?return_to=https%3A%2F%2Fgithub.com%2Fmappls-api%2Fmappls-ios-sdk%2Fblob%2Fmain%2Fdocs%2Fv1.0.14%2FMapplsMap.md","isCSV":false,"isRichtext":true,"toc":[{"level":1,"text":"Mappls Map SDK","anchor":"mappls-map-sdk","htmlText":"Mappls Map SDK"},{"level":2,"text":"Introduction","anchor":"introduction","htmlText":"Introduction"},{"level":1,"text":"Map SDK","anchor":"map-sdk","htmlText":"Map SDK"},{"level":2,"text":"Getting Started","anchor":"getting-started","htmlText":"Getting Started"},{"level":2,"text":"Version History","anchor":"version-history","htmlText":"Version History"},{"level":2,"text":"Setup your Project","anchor":"setup-your-project","htmlText":"Setup your Project"},{"level":4,"text":"Create a new project in Xcode.","anchor":"create-a-new-project-in-xcode","htmlText":"Create a new project in Xcode."},{"level":2,"text":"Authorization","anchor":"authorization","htmlText":"Authorization"},{"level":3,"text":"MapplsAPICore","anchor":"mapplsapicore","htmlText":"MapplsAPICore"},{"level":3,"text":"MapplsMap","anchor":"mapplsmap","htmlText":"MapplsMap"},{"level":2,"text":"Usage","anchor":"usage","htmlText":"Usage"},{"level":2,"text":"Add a Mappls Map View","anchor":"add-a-mappls-map-view","htmlText":"Add a Mappls Map View"},{"level":4,"text":"By Interface Builder","anchor":"by-interface-builder","htmlText":"By Interface Builder"},{"level":4,"text":"By Programmatically","anchor":"by-programmatically","htmlText":"By Programmatically"},{"level":4,"text":"Objective C","anchor":"objective-c","htmlText":"Objective C"},{"level":4,"text":"Swift","anchor":"swift","htmlText":"Swift"},{"level":2,"text":"Map Interactions","anchor":"map-interactions","htmlText":"Map Interactions"},{"level":3,"text":"Set Zoom Level","anchor":"set-zoom-level","htmlText":"Set Zoom Level"},{"level":4,"text":"Objective C","anchor":"objective-c-1","htmlText":"Objective C"},{"level":4,"text":"Swift","anchor":"swift-1","htmlText":"Swift"},{"level":3,"text":"Set Map Center","anchor":"set-map-center","htmlText":"Set Map Center"},{"level":4,"text":"Objective C","anchor":"objective-c-2","htmlText":"Objective C"},{"level":4,"text":"Swift","anchor":"swift-2","htmlText":"Swift"},{"level":2,"text":"Map Features","anchor":"map-features","htmlText":"Map Features"},{"level":3,"text":"Current Location","anchor":"current-location","htmlText":"Current Location"},{"level":4,"text":"Objective C","anchor":"objective-c-3","htmlText":"Objective C"},{"level":4,"text":"Swift","anchor":"swift-3","htmlText":"Swift"},{"level":3,"text":"Tracking Mode","anchor":"tracking-mode","htmlText":"Tracking Mode"},{"level":4,"text":"Objective C","anchor":"objective-c-4","htmlText":"Objective C"},{"level":4,"text":"Swift","anchor":"swift-4","htmlText":"Swift"},{"level":2,"text":"Map Events","anchor":"map-events","htmlText":"Map Events"},{"level":3,"text":"Map Position Changes Events","anchor":"map-position-changes-events","htmlText":"Map Position Changes Events"},{"level":3,"text":"Loading the Map Events","anchor":"loading-the-map-events","htmlText":"Loading the Map Events"},{"level":4,"text":"-authorizationCompleted:withError:","anchor":"-authorizationcompletedwitherror","htmlText":"-authorizationCompleted:withError:"},{"level":4,"text":"-mapViewWillStartLoadingMap:","anchor":"-mapviewwillstartloadingmap","htmlText":"-mapViewWillStartLoadingMap:"},{"level":4,"text":"-mapViewDidFinishLoadingMap:","anchor":"-mapviewdidfinishloadingmap","htmlText":"-mapViewDidFinishLoadingMap:"},{"level":4,"text":"-mapViewDidFailLoadingMap:withError:","anchor":"-mapviewdidfailloadingmapwitherror","htmlText":"-mapViewDidFailLoadingMap:withError:"},{"level":4,"text":"-mapViewWillStartRenderingFrame:","anchor":"-mapviewwillstartrenderingframe","htmlText":"-mapViewWillStartRenderingFrame:"},{"level":4,"text":"-mapViewDidFinishRenderingFrame:fullyRendered:","anchor":"-mapviewdidfinishrenderingframefullyrendered","htmlText":"-mapViewDidFinishRenderingFrame:fullyRendered:"},{"level":4,"text":"-mapViewDidBecomeIdle:","anchor":"-mapviewdidbecomeidle","htmlText":"-mapViewDidBecomeIdle:"},{"level":4,"text":"-mapView:didFinishLoadingStyle:","anchor":"-mapviewdidfinishloadingstyle","htmlText":"-mapView:didFinishLoadingStyle:"},{"level":4,"text":"-mapView:didTapPlaceWithMapplsPin:","anchor":"-mapviewdidtapplacewithmapplspin","htmlText":"-mapView:didTapPlaceWithMapplsPin:"},{"level":3,"text":"SDK Error Codes","anchor":"sdk-error-codes","htmlText":"SDK Error Codes"},{"level":3,"text":"Tracking User Location Events","anchor":"tracking-user-location-events","htmlText":"Tracking User Location Events"},{"level":3,"text":"Appearance of Annotations Events","anchor":"appearance-of-annotations-events","htmlText":"Appearance of Annotations Events"},{"level":3,"text":"Annotation Views Events","anchor":"annotation-views-events","htmlText":"Annotation Views Events"},{"level":3,"text":"Selecting Annotations Events","anchor":"selecting-annotations-events","htmlText":"Selecting Annotations Events"},{"level":3,"text":"Callout Views Events","anchor":"callout-views-events","htmlText":"Callout Views Events"},{"level":2,"text":"Map Tap Events","anchor":"map-tap-events","htmlText":"Map Tap Events"},{"level":3,"text":"Single Tap Gesture","anchor":"single-tap-gesture","htmlText":"Single Tap Gesture"},{"level":4,"text":"Objective C","anchor":"objective-c-5","htmlText":"Objective C"},{"level":4,"text":"Swift","anchor":"swift-5","htmlText":"Swift"},{"level":3,"text":"Long Tap Gesture","anchor":"long-tap-gesture","htmlText":"Long Tap Gesture"},{"level":4,"text":"Objective C","anchor":"objective-c-6","htmlText":"Objective C"},{"level":4,"text":"Swift","anchor":"swift-6","htmlText":"Swift"},{"level":2,"text":"Map Overlays","anchor":"map-overlays","htmlText":"Map Overlays"},{"level":3,"text":"Add marker","anchor":"add-marker","htmlText":"Add marker"},{"level":4,"text":"Objective C","anchor":"objective-c-7","htmlText":"Objective C"},{"level":4,"text":"Swift","anchor":"swift-7","htmlText":"Swift"},{"level":3,"text":"Remove marker","anchor":"remove-marker","htmlText":"Remove marker"},{"level":4,"text":"Objective C","anchor":"objective-c-8","htmlText":"Objective C"},{"level":4,"text":"Swift","anchor":"swift-8","htmlText":"Swift"},{"level":3,"text":"Custom Marker (Change Default Marker Icon)","anchor":"custom-marker-change-default-marker-icon","htmlText":"Custom Marker (Change Default Marker Icon)"},{"level":3,"text":"Show Info Window (Callout)","anchor":"show-info-window-callout","htmlText":"Show Info Window (Callout)"},{"level":3,"text":"Custom Info Window(#Custom-Info-Window)","anchor":"custom-info-windowcustom-info-window","htmlText":"Custom Info Window(#Custom-Info-Window)"},{"level":2,"text":"Polylines","anchor":"polylines","htmlText":"Polylines"},{"level":3,"text":"Add a Polyline","anchor":"add-a-polyline","htmlText":"Add a Polyline"},{"level":4,"text":"Objective C","anchor":"objective-c-9","htmlText":"Objective C"},{"level":4,"text":"Swift","anchor":"swift-9","htmlText":"Swift"},{"level":3,"text":"Remove a Polyline","anchor":"remove-a-polyline","htmlText":"Remove a Polyline"},{"level":4,"text":"Objective C","anchor":"objective-c-10","htmlText":"Objective C"},{"level":4,"text":"Swift","anchor":"swift-10","htmlText":"Swift"},{"level":3,"text":"Polyline Width","anchor":"polyline-width","htmlText":"Polyline Width"},{"level":4,"text":"Objective C","anchor":"objective-c-11","htmlText":"Objective C"},{"level":4,"text":"Swift","anchor":"swift-11","htmlText":"Swift"},{"level":2,"text":"Polygons","anchor":"polygons","htmlText":"Polygons"},{"level":3,"text":"Add a Polygon","anchor":"add-a-polygon","htmlText":"Add a Polygon"},{"level":4,"text":"Objective C","anchor":"objective-c-12","htmlText":"Objective C"},{"level":4,"text":"Swift","anchor":"swift-12","htmlText":"Swift"},{"level":3,"text":"Remove a Polygon","anchor":"remove-a-polygon","htmlText":"Remove a Polygon"},{"level":4,"text":"Objective C","anchor":"objective-c-13","htmlText":"Objective C"},{"level":4,"text":"Swift","anchor":"swift-13","htmlText":"Swift"},{"level":2,"text":"Map Camera","anchor":"map-camera","htmlText":"Map Camera"},{"level":3,"text":"Fit Map Camera","anchor":"fit-map-camera","htmlText":"Fit Map Camera"},{"level":4,"text":"Swift","anchor":"swift-14","htmlText":"Swift"},{"level":3,"text":"Create Camera For Shape","anchor":"create-camera-for-shape","htmlText":"Create Camera For Shape"},{"level":4,"text":"Objective C","anchor":"objective-c-14","htmlText":"Objective C"},{"level":4,"text":"Swift","anchor":"swift-15","htmlText":"Swift"},{"level":2,"text":"Miscellaneous","anchor":"miscellaneous","htmlText":"Miscellaneous"},{"level":3,"text":"Shape Stroke Color","anchor":"shape-stroke-color","htmlText":"Shape Stroke Color"},{"level":4,"text":"Objective C","anchor":"objective-c-15","htmlText":"Objective C"},{"level":4,"text":"Swift","anchor":"swift-16","htmlText":"Swift"},{"level":3,"text":"Shape Fill Color","anchor":"shape-fill-color","htmlText":"Shape Fill Color"},{"level":4,"text":"Objective C","anchor":"objective-c-16","htmlText":"Objective C"},{"level":4,"text":"Swift","anchor":"swift-17","htmlText":"Swift"},{"level":3,"text":"Shape Opacity","anchor":"shape-opacity","htmlText":"Shape Opacity"},{"level":4,"text":"Objective C","anchor":"objective-c-17","htmlText":"Objective C"},{"level":4,"text":"Swift","anchor":"swift-18","htmlText":"Swift"},{"level":3,"text":"Safety Status Strip","anchor":"safety-status-strip","htmlText":"Safety Status Strip"},{"level":3,"text":"Cluster Based Authentication","anchor":"cluster-based-authentication","htmlText":"Cluster Based Authentication"},{"level":4,"text":"Set Cluster Device","anchor":"set-cluster-device","htmlText":"Set Cluster Device"},{"level":4,"text":"Objective C","anchor":"objective-c-18","htmlText":"Objective C"},{"level":4,"text":"Swift","anchor":"swift-19","htmlText":"Swift"},{"level":2,"text":"SwiftUI","anchor":"swiftui","htmlText":"SwiftUI"},{"level":3,"text":"Create Map View","anchor":"create-map-view","htmlText":"Create Map View"},{"level":3,"text":"Respond To Map Events","anchor":"respond-to-map-events","htmlText":"Respond To Map Events"},{"level":2,"text":"Our many happy customers:","anchor":"our-many-happy-customers","htmlText":"Our many happy customers:"}],"lineInfo":{"truncatedLoc":"1008","truncatedSloc":"726"},"mode":"file"},"image":false,"isCodeownersFile":null,"isPlain":false,"isValidLegacyIssueTemplate":false,"issueTemplateHelpUrl":"https://docs.github.com/articles/about-issue-and-pull-request-templates","issueTemplate":null,"discussionTemplate":null,"language":"Markdown","languageID":222,"large":false,"loggedIn":false,"newDiscussionPath":"/mappls-api/mappls-ios-sdk/discussions/new","newIssuePath":"/mappls-api/mappls-ios-sdk/issues/new","planSupportInfo":{"repoIsFork":null,"repoOwnedByCurrentUser":null,"requestFullPath":"/mappls-api/mappls-ios-sdk/blob/main/docs/v1.0.14/MapplsMap.md","showFreeOrgGatedFeatureMessage":null,"showPlanSupportBanner":null,"upgradeDataAttributes":null,"upgradePath":null},"publishBannersInfo":{"dismissActionNoticePath":"/settings/dismiss-notice/publish_action_from_dockerfile","dismissStackNoticePath":"/settings/dismiss-notice/publish_stack_from_file","releasePath":"/mappls-api/mappls-ios-sdk/releases/new?marketplace=true","showPublishActionBanner":false,"showPublishStackBanner":false},"renderImageOrRaw":false,"richText":"

\n

Mappls Map SDK

\n

Introduction

\n

This repository contains a sample project of an app built for iOS, which is based on Mappls's Map and other differennt SDKs.

\n

Welcome to the Mappls iOS SDK

\n

Explore the largest directory of APIs & SDKs for maps, routes and search.

\n

Mappls's APIs, SDKs, and live updating map data available for 238 nations give developers tools to build better mapping, navigation, and search experiences across platforms.

\n

In this section you will find documentation for :-

\n
    \n
  • Detailed information about integration of Vector iOS Map.
  • \n
  • REST APIs module is a custom module for developers to consume our RESTful APIs within their applications, easily, and without having to develop such\nfunctionality from scratch.
  • \n
  • Detailed information related to how to integrate Mappls Widgets.
  • \n
\n

Map SDK

\n

MapplsMap is a SDK to display map, mark locations, enhance with custom data and even draw routes or other shapes on top.

\n

Getting Started

\n

Mappls's Map SDK for iOS lets you easily add Mappls Map and web services to your own iOS app. Mappls's Map SDK for iOS supports iOS SDK 9.0 and above and Xcode 10.1 or later. You can have a look at the map and features you will get in your own app by using the Mappls's Maps app for iOS. The SDK handles map tiles download and their display along with a bunch of controls and native gestures.

\n

Version History

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
VersionDatedDescription
5.13.907 Jun, 2023Bug fixes & Improvements.
5.13.830 May, 2023Domain of APIs changed.
5.13.702 May, 2023Performance improvements and optimization.
5.13.620 Mar, 2023Performance improvements and optimization.
5.13.531 Jan, 2023Fixed ¨C6C not getting called and added a class ¨C7C which can be used to initialize SDK using the method ¨C8C
¨C9C13 Oct, 2022Give ¨C10C in delegate function ¨C11C on map tap. Performance improvements and optimization.
¨C12C08 Sep, 2022Issue Resolved: Tiles not loading on CarPlay when phone is in locked state.
¨C13C18 Aug, 2022Bug Resolved: Session not resetting.
¨C14C20 Jul, 2022Bug Resolved: Duplicate Bundle Id.
¨C15C11 June, 2022Initial Mappls Map Release.
\n

Setup your Project

\n

Create a new project in Xcode.

\n
    \n¨C97C\n¨C98C\n
\n

¨C99C

\n
    \n¨C100C\n¨C101C\n
\n\n¨C102C\n\n

Authorization

\n

MapplsAPICore

\n

It is required to set Mappls keys to use any MAPPL's SDK. Please refer to documenatation here.

\n

MapplsMap

\n

A class ¨C22C can be used to authorize the Map.

\n

It is recommended to call this method before initilizing ¨C23C.

\n

Swift

\n
¨C103C
\n

Objective - C

\n
¨C104C
\n

Note: Although authorization of Map is done internally on initilizing ¨C24C, ¨C105C

\n

Usage

\n

Add a Mappls Map View

\n

Map View on view controller can be added either using interface builder or programmatically.

\n

By Interface Builder

\n

In a storyboard, add a view to your View Controller. In the Identity inspector, change its class to ¨C25C.
\n¨C106C Map style url need to be set at the time of load map

\n

By Programmatically

\n

To add map on view Controller create an instance of ¨C26C. and add this to view of ¨C27C.

\n

Objective C

\n
¨C107C
\n

Swift

\n
¨C108C
\n

¨C109C Also to handle app transport security exception add ¨C28C in Info.plist of your project. As follows:

\n
¨C29C
\n

Map Interactions

\n

Set Zoom Level

\n

Set zoom to 4 for country level display and 18 for house number display.

\n

Objective C

\n
¨C110C
\n

Swift

\n
¨C111C
\n

Set Map Center

\n

To set Center of map reference code is below:

\n

Objective C

\n
¨C112C
\n

Swift

\n
¨C113C
\n

Map Features

\n

Current Location

\n

To show user's current location on map, use property ¨C30C and set its value to true.

\n

Objective C

\n
¨C114C
\n

Swift

\n
¨C115C
\n

Tracking Mode

\n

To move map with user location change use property ¨C31C. Its an enum property of type ¨C32C. You can set any value from following:

\n
    \n¨C116C\n¨C117C\n¨C118C\n
\n

Objective C

\n
¨C119C
\n

Swift

\n
¨C120C
\n

Map Events

\n

The Map object should implement the methods of the ¨C36C protocol corresponding to the events you wish it to receive. This delegate can also be used to detect map overlays selection. Delegate handles gesture events, tap on annotation (marker) and map center coordinates.

\n

Map Position Changes Events

\n
¨C37C
\n

Loading the Map Events

\n

-authorizationCompleted:withError:

\n

This delegate function will be called whenever authorization process of map completed. It gives either sucess or error

\n

¨C121C

\n
¨C122C
\n

¨C123C

\n
¨C124C
\n

-mapViewWillStartLoadingMap:

\n

Tells the delegate that the map view will begin to load.

\n

This method is called whenever the map view starts loading, including when a new style has been set and the map must reload.

\n

¨C125C

\n
¨C126C
\n

¨C127C

\n
¨C128C
\n

-mapViewDidFinishLoadingMap:

\n

Tells the delegate that the map view has finished loading.

\n

This method is called whenever the map view finishes loading, either after the initial load or after a style change has forced a reload.

\n

¨C129C

\n
¨C130C
\n

¨C131C

\n
¨C132C
\n

-mapViewDidFailLoadingMap:withError:

\n

Tells the delegate that the map view was unable to load data needed for displaying the map.

\n

This method may be called for a variety of reasons, including a network connection failure or a failure to fetch the style from the server. You can use the given error message to notify the user that map data is unavailable.

\n

¨C133C

\n
¨C134C
\n

¨C135C

\n
¨C136C
\n

-mapViewWillStartRenderingFrame:

\n

Tells the delegate that the map view is about to redraw.

\n

This method is called any time the map view needs to redraw due to a change in the viewpoint or style property transition. This method may be called very frequently. Therefore, your implementation of this method should be as lightweight as possible to avoid affecting performance.

\n

¨C137C

\n
¨C138C
\n

¨C139C

\n
¨C140C
\n

-mapViewDidFinishRenderingFrame:fullyRendered:

\n

Tells the delegate that the map view has just redrawn.

\n

This method is called any time the map view needs to redraw due to a change in the viewpoint or style property transition. This method may be called very frequently. Therefore, your implementation of this method should be as lightweight as possible to avoid affecting performance.

\n

¨C141C

\n
¨C142C
\n

¨C143C

\n
¨C144C
\n

-mapViewDidBecomeIdle:

\n

Tells the delegate that the map view is entering an idle state, and no more drawing will be necessary until new data is loaded or there is some interaction with the map.

\n

¨C145C

\n
¨C146C
\n

¨C147C

\n
¨C148C
\n

-mapView:didFinishLoadingStyle:

\n

Tells the delegate that the map has just finished loading a style.

\n

This method is called during the initialization of the map view and after any subsequent loading of a new style.

\n

¨C149C

\n
¨C150C
\n

¨C151C

\n
¨C152C
\n

-mapView:didTapPlaceWithMapplsPin:

\n

This delegate function gives ¨C38C.

\n

This method is called on tap on map and gives either string value (Mappls Pin) or nil value (if no Mappls Pin found).

\n

¨C153C

\n
¨C154C
\n

¨C155C

\n
¨C156C
\n

SDK Error Codes

\n

Map will fail with following error codes

\n
    \n¨C157C\n¨C158C\n¨C159C\n¨C160C\n¨C161C\n¨C162C\n¨C163C\n
\n

Tracking User Location Events

\n
¨C39C
\n

Appearance of Annotations Events

\n
¨C40C
\n

Annotation Views Events

\n
¨C41C
\n

Selecting Annotations Events

\n
¨C42C
\n

Callout Views Events

\n
¨C43C
\n

Map Tap Events

\n

Single Tap Gesture

\n

To capture single tap on map events add a tap gesture to instance of ¨C44C. Tapped CGPoint on map can be converted to CLLocationCoordinate object. Also if there is any mareker in tapped area that can also be retrieved. Code for reference to explain above features is below:

\n

Objective C

\n
¨C164C
\n

Swift

\n
@objc func didTapMap(tap: UITapGestureRecognizer) {\n if tap.state == .ended {\n let point = tap.location(in: mapView)\n\n // Convert tapped area point to a CLLocationCoordinate object\n let coordinate = mapView.convert(point, toCoordinateFrom: mapView)\n\n // Also existing annotation or features can be checked on tapped area point\n let visibleFeatures = mapView.visibleFeatures(at: point)\n if visibleFeatures.count > 0 {\n\n }\n }\n}\">¨C165C
\n

Long Tap Gesture

\n

To capture long press on map events add a long press gesture to instance of ¨C45C.

\n

Objective C

\n
¨C166C
\n

Swift

\n
¨C167C
\n

Map Overlays

\n

Add marker

\n

To show an annotation on map create an instance of ¨C46C and add that object to instance of ¨C47C using method ¨C48C.

\n

After creating instance of ¨C49C, set coordinate and title property values.

\n

Objective C

\n
¨C168C
\n

Swift

\n
¨C169C
\n

Remove marker

\n

Objective C

\n
¨C170C
\n

Swift

\n
¨C171C
\n

Custom Marker (Change Default Marker Icon)

\n

To change image for default marker you can use delegate methods of protocol
\n¨C50C.\nEither you can override whole view of marker by using below method of delegate:

\n
¨C51C
\n

or you can override image of marker by using below method of delegate:

\n
¨C52C
\n

Show Info Window (Callout)

\n

To enable info window on tap of marker return true from below delegate method:

\n
¨C172C
\n

Custom Info Window(#Custom-Info-Window)

\n

To change default callout view of annotation use delegate function of ¨C53C protocol and return custom view of callout from that function.

\n
¨C173C
\n

To create custom callout view create a class inherited from ¨C54C and ¨C55C. Override draw function of ¨C56C to design your own callout view.

\n

Polylines

\n

Add a Polyline

\n

To show a polyline on map create an instance of ¨C57C and add that object to instance of ¨C58C using method ¨C59C.

\n

To create instance of ¨C60C an array of ¨C61C will be required so first create an array of ¨C62C.

\n

Objective C

\n
¨C174C
\n

Swift

\n
¨C175C
\n

Remove a Polyline

\n

Objective C

\n
¨C176C
\n

Swift

\n
¨C177C
\n

Polyline Width

\n

Line width in points can be set when rendering the outline of a polyline annotation. It cab be achieve by using delegate method ¨C63C.

\n

By default, the polyline is outlined with a line 3.0 points wide.

\n

Objective C

\n
¨C178C
\n

Swift

\n
¨C179C
\n

Polygons

\n

Add a Polygon

\n

To show a polygon on map create an instance of ¨C64C and add that object to instance of ¨C65C using method ¨C66C.

\n

To create instance of ¨C67C an array of ¨C68C will be required so first create an array of ¨C69C.

\n

Objective C

\n
¨C180C
\n

Swift

\n
¨C181C
\n

Remove a Polygon

\n

Objective C

\n
¨C182C
\n

Swift

\n
¨C183C
\n

Map Camera

\n

Fit Map Camera

\n

¨C70C function sets the visible region so that the map displays the specified annotations.

\n

Swift

\n
¨C184C
\n

Create Camera For Shape

\n

A camera object that best fits the given shape with some additional padding on each side while looking in the specified direction can be retrieved using function ¨C71C of ¨C72C.

\n

After creating a camera object using above function it can be set to fit map visible area.

\n

Objective C

\n
¨C185C
\n

Swift

\n
¨C186C
\n

Miscellaneous

\n

Shape Stroke Color

\n

Color of ¨C73C and stroke color of ¨C74C can be changed by using delegate method ¨C75C.

\n

The default stroke color is the map view’s tint color.

\n

Objective C

\n
¨C187C
\n

Swift

\n
¨C188C
\n

Shape Fill Color

\n

Fill Color of ¨C76C can be changed by using delegate method ¨C77C.

\n

The default fill color is the map view’s tint color.

\n

Objective C

\n
¨C189C
\n

Swift

\n
¨C190C
\n

Shape Opacity

\n

To change opacity of a shape i.e polyline or polygon, delegate method ¨C78C can be used.

\n

It sets the opacity of an entire shape, inclusive of its stroke and fill.

\n

Objective C

\n
¨C191C
\n

Swift

\n
¨C192C
\n

Safety Status Strip

\n

A safety status strip can be show on map based on user's location. COVID-19 status will be shown on map currently, It will show whether user's location lies in a containment zone or not and conaintment zone info like Containment Zone Name, District etc. For more info about how to use go to Safety Strip.

\n

Cluster Based Authentication

\n

Map SDK can be configured such that it can work only for specified unique identifier of a device and will show an error accordingly.

\n

Set Cluster Device

\n

Cluster Identifier can be set and retrieve using singelton class ¨C79C which is part of Map SDK's dependency ¨C80C.

\n

Below is code for reference to set and get cluster identifier.

\n

Objective C

\n
¨C193C
\n

Swift

\n
¨C194C
\n

SwiftUI

\n

Create Map View

\n
    \n¨C195C\n¨C196C\n¨C197C\n¨C198C\n
\n

To add map annoations at design time add an ¨C85C property in ¨C86C struct as below:

\n
¨C87C
\n

Use below code to add marker at design time by setting annotations property.

\n
@State var annotations: [MGLPointAnnotation] = [\n MGLPointAnnotation(title: "MAPPLS", coordinate: .init(latitude: 28.550679, longitude: 77.268949))\n ]\n \n var body: some View {\n MapView(annotations: $annotations).centerCoordinate(.init(latitude: 28.550679, longitude: 77.268949)).zoomLevel(16)\n }\n}\">
¨C88C
\n

Respond To Map Events

\n

In order to to respond to map events, for example perform an action after MapView initialization finished. In SwiftUI, a Coordinator can be used with delegates, data sources, and user events. The UIViewRepresentable protocol defines makeCoordinator() method which creates coordinator instance. Add the following code to declare coordinator class:

\n
¨C89C
\n

And then add the following method to the SwiftUI view:

\n
¨C90C
\n

And finally set the reference coordinator on Mappls map view.

\n
¨C91C
\n




\n

Our many happy customers:

\n

\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"\"

\n
\n

For any queries and support, please contact:

\n

\n

Email us at [email protected]

\n

\"\"\nSupport\nNeed support? contact us!

\n



\n

\"\"\"\"

\n

\"\"\"\"\"\"

\n
@ Copyright 2022 CE Info Systems Pvt. Ltd. All Rights Reserved.
\n
","renderedFileInfo":null,"shortPath":null,"tabSize":8,"topBannersInfo":{"overridingGlobalFundingFile":false,"globalPreferredFundingPath":null,"repoOwner":"mappls-api","repoName":"mappls-ios-sdk","showInvalidCitationWarning":false,"citationHelpUrl":"https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/creating-a-repository-on-github/about-citation-files","showDependabotConfigurationBanner":false,"actionsOnboardingTip":null},"truncated":false,"viewable":true,"workflowRedirectUrl":null,"symbols":{"timedOut":false,"notAnalyzed":true,"symbols":[]}},"copilotInfo":null,"csrf_tokens":{"/mappls-api/mappls-ios-sdk/branches":{"post":"34BCoosN16A3PfDmQRnmqi6S6QW5CAfZvuaYQXMnlylrwE9J-vdHLTFMr4xBRDYR7hRi3cKRIHkTdI3-FU12tQ"},"/repos/preferences":{"post":"Jvjw2wG4gvlg_JgMX9NSJRUt38J3hT4aA21j1-6_fLLTP4hG95AcwMONMuYOMrxfQq-cmEfO_5UhuOusxraBTg"}}},"title":"mappls-ios-sdk/docs/v1.0.14/MapplsMap.md at main · mappls-api/mappls-ios-sdk"}