This repository distributes a package rather than defining the complete product contract. Pair it with the owning SDK or product guide.
What this surface enables
Mappls Geoanalytics Native for iOS distributed via the SPM (Swift Package Manager).
No durable provider record or application workflow contract was established from the source identity or bounded document evidence; view, camera, callback, and authentication sessions alone do not make a source stateful.
Authority: Conservative Default · No durable-state signal promoted from incidental vocabularyiOS
MapsSearch PlacesTracking TelematicsGis AnalyticsWidgets Deep LinksCapture FeedbackIdentity Platform
SwiftText
No explicit authentication signal detected
Prepare the integration
- An iOS project with Xcode and the package manager required by the source release
- The corresponding product entitlement enabled for the developer application
Setup and usage examples
These examples were extracted from the canonical public source document and sanitized for credential-like values. Check the source branch and package version before copying into a production application.
var geoanalyticsPlugin : MapplsGeoanalyticsPlugin = MapplsGeoanalyticsPlugin(mapView: mapView)Topics documented by the source
01Introduction
MapplsGeoanalytics is a plugin over Mappls's GeoAnalytics APIs. Geoanalytics APIs gives the users the power to display, style, and edit the data which is archived in Mappls's Database and overlay it on the user created maps.
• Enables data selection, visualization, queries & styling with rich base map available at various level of granularity - Build maps quickly and easily without coordinates, using country, pin codes or simply place names - Drill and analyze different type of map layers such as districts, pincode, villages, city etc at Pan India level or restricted to limited bound /Area of interest - Allows user to set their own styling parameters such as label color scheme, geometry color schemes, opacity, width, stroke etc. - Allows to create rich thematic visuals using combination of value ranges
This plugin gets the layer specified which is stored in Mappls’s Database and gives a WMS layer as an output with any filters or styles specified by the user.
02Installation
To add a package dependency to your Xcode project, select File > Swift Packages > Add Package Dependency and enter its repository URL. See Adding Package Dependencies to Your App.
03Dependencies
This library depends upon several Mappls's own libraries. All dependent libraries will be automatically installed on using SPM.
Below are list of dependcies which are required to run this SDK:
• MapplsAPICore - MapplsAPIKit - MapplsMaps
04Dependencies
This library depends upon several Mappls's own libraries. All dependent libraries will be automatically installed using CocoaPods.
Below are list of dependencies which are required to run this SDK:
• MapplsAPICore - MapplsAPIKit - MapplsMaps
05MapplsAPICore
It is required to set MAPPLS's keys to use any MAPPL's SDK. Please see here to achieve this.
06Geoanalytics Layer Types
An enum MapplsGeoanalyticsLayerType can be used to get different types of layers. Below are different types which are available:
1. MapplsGeoanalyticsLayerTypeState 2. MapplsGeoanalyticsLayerTypeDistrict 3. MapplsGeoanalyticsLayerTypeSubDistrict 4. MapplsGeoanalyticsLayerTypeCity 5. MapplsGeoanalyticsLayerTypeTown 6. MapplsGeoanalyticsLayerTypeLocality 7. MapplsGeoanalyticsLayerTypeSubLocality 8. MapplsGeoanalyticsLayerTypeSubSubLocality 9. MapplsGeoanalyticsLayerTypePanchayat 10. MapplsGeoanalyticsLayerTypeVillage 11. MapplsGeoanalyticsLayerTypeWard 12. MapplsGeoanalyticsLayerTypePincode 13. MapplsGeoanalyticsLayerTypeBlock
Now that you’re all caught up with the features, let's get down right to them and look at how you can integrate our GeoAnalytics plugin to add data on your map in few simple steps.
07Use of GeoAnalytics API
Use instance of MapplsGeoanalyticsPlugin to show response of GeoAnalytics API as Map Layers.
For infomation about GeoAnalytics API go here.
08Step 1 - Get GeoAnalytics layers
To get response of GeoAnalytics API, Create an instance of MapplsGeoanalyticsLayerRequest. Below is code snipet for this.
09MapplsGeoanalyticsLayerRequest
Below are parameters of MapplsGeoanalyticsLayerRequest class.
• geoboundType (mandatory): It is of type String. It accepts type of geographical extents on which data would be bound. eg. "India", "State", "District" etc.
• geobound (mandatory): It is an array of type MapplsGeoanalyticsGeobound. For more info see here.
• propertyName (mandatory): It is an array of type String. eg. ["sttnme"], ["sttid"], ["tp"].
• layerType (mandatory): It is the type of layer that user want to show on map it is an enum of type MapplsGeoanalyticsLayerType.
The following are optional parameters
10MapplsGeoanalyticsGeobound
Instance of MapplsGeoanalyticsGeobound is used as a parameter in class MapplsGeoanalyticsLayerRequest. It has two properties geobound and appearance(optional). Where appearance is of type GeoanalyticsLayerAppearance.
##### GeoanalyticsLayerAppearance:
This is the class used to set the appearance of the layer, i.e layerColor, textColor, border color etc. it has following properties: - fillColor - fillOpacity - labelColor - labelSize - strokeColor - strokeWidth
11Step 2 - Adding GeoAnalytics layer on Map
A function showGeoanalyticsLayer available in MapplsGeoanalyticsPlugin which accepts a parameter of type MapplsGeoanalyticsLayerRequest. Plugin internally consume that request to get response and plot layer on Map accordingly.
12Other Methods Available:
1. Remove GeoAnalytics Layer
removeGeonalyticsLayer is a function which accepts request of type MapplsGeoanalyticsLayerRequest to remove related layer from map.
2. GeoAnalytics Layer Info
A delegate function can be used for information of layer where map is tapped. Below is the delegate function which returns response of feature info api.
A popup will be shown for information of layer where map is tapped. There is a property shouldShowPopupForGeoanalyticsLayer available to enable or disable that popup. It is of type Bool by default its value is false.
A delegate function can be used to show custom popup for layer information. Below is delegate function for the same.
13Introduction:
MapplsGeoanalytics plugin contains a manager class to consume Mappls's Listing API. Listing API is an API that gives the user's information on the different layers & attributes available within Geo-Analytics Core APIs. This API acts as an assisting API to quickly get the necessary details that are required to accurately fetch the required overlays from the core Geo-Analytics APIs.
It provides list of attributes along with unique ID. User can get bounding box of the required feature/area as well.
For more information about Listing API see here.
14Step 1 - Create Request
First create an instance of GeoanalyticsListingAPIRequest as shown below.
Possible request parameters in class of GeoanalyticsListingAPIRequest are listed below.
15GeoanalyticsListingAPIRequest
• geoboundType: It is of type string which accepts the type of geobound. - geobound: Single valued parent type, for example: sttnme, dstnme, sdbnme etc. Note: For parent type reference, contact apisupport@Mappls.com - attribute: field name/bounding Box requested w.r.t api (api) & parent type (geoboundtype). Bounding box can be requested as "bbox" variable. - api: It is an enum of type MapplsGeoanalyticsLayerType which specifie type of listing api.
16Step 2 - Send Request
Use shared instance of MapplsGeoanalyticsListingManager and call getListingInfo method which accepts request parameter of type GeoanalyticsListingAPIRequest as created in previous step. Method getListingInfo returns response of type GeoanalyticsListingAPIsResponse and error of type NSError in completion code block.
17GeoanalyticsListingAPIsResponse
GeoanalyticsListingAPIsResponse contains following properties.
• responseCode: It is of type NSString
• version: It is the response attribute of type NSString
• totalFeatureCount: IT is the response attribute of type NSString.
• results: It is the response parameter which is of type GeoanalyticsListingAPIsResult.
GeoanalyticsListingAPIsResult is the class which contains following property.
18Our many happy customers:
For any queries and support, please contact:
Email us at apisupport@mappls.com
Support Need support? contact us!
[](https://about.mappls.com/blog/)[](https://github.com/mappls-api)
[](https://twitter.com/mappls)[](https://www.linkedin.com/company/mappls/)[](https://www.youtube.com/channel/UCAWvWsh-dZLLeUU7J9HiOA)
@ Copyright 2020 CE Info Systems Pvt. Ltd. All Rights Reserved.
Service references found
URLs are sanitized during ingestion and may include documentation or legacy hosts. Use them to trace the source, not as a substitute for the current API contract.
https://www.mapmyindia.com/apihttps://developer.apple.com/documentation/xcode/adding-package-dependencies-to-your-app).https://github.com/mappls-api/mappls-ios-sdk/docs/v1.0.0/MapplsAPICore.mdhttps://github.com/mappls-api/mappls-ios-sdk/docs/v1.0.0/MapplsAPIKit.mdhttps://github.com/mappls-api/mappls-ios-sdk/docs/v1.0.0/MapplsMap.mdhttps://about.mappls.com/api/advanced-maps/geoanalytics-web-js/geo-analytics-mapmyindia-js).**https://www.mappls.com/api/advanced-maps/geoanalytics-web-js/listingapi).https://www.mapmyindia.com/api/img/logos1/PhonePe.png)[](https://about.mappls.com/blog/)[](https://github.com/mappls-api)[https://www.npmjs.com/org/mapmyindiahttps://www.facebook.com/Mapplsofficial)[](https://twitter.com/mappls)[](https://www.linkedin.com/company/mappls/)[](https://www.youtube.com/channel/UCAWvWsh-dZLLeUU7_J9HiOAhttps://about.mappls.com/api/terms-&-conditionshttps://www.mappls.com/about/privacy-policyhttps://www.mappls.com/pdf/mappls-sustainability-policy-healt-labour-rules-supplir-sustainability.pdf