From 802de6a8f0362d1f9d13d0a3655eee0894c753d3 Mon Sep 17 00:00:00 2001 From: Saksham Date: Tue, 5 Dec 2023 09:44:19 +0530 Subject: [PATCH] Update Sample and Documentation --- README.md | 80 ++-- android/app/build.gradle | 9 + android/build.gradle | 6 +- docs/v1.0.0/README.md | 1 - docs/v1.0.1/README.md | 1 - docs/v1.0.2/Callout.md | 48 +++ docs/v1.0.2/Camera.md | 248 +++++++++++++ docs/v1.0.2/Direction-Widget.md | 213 +++++++++++ docs/v1.0.2/Geofence-Widget.md | 158 ++++++++ docs/v1.0.2/Getting-Started.md | 268 ++++++++++++++ docs/v1.0.2/Images.md | 44 +++ docs/v1.0.2/Light.md | 112 ++++++ docs/v1.0.2/Map-View.md | 207 +++++++++++ docs/v1.0.2/Nearby-Report.md | 83 +++++ docs/v1.0.2/Nearby-Widget-Advance.md | 126 +++++++ docs/v1.0.2/Nearby-Widget.md | 172 +++++++++ docs/v1.0.2/Place-Autocomplete.md | 185 ++++++++++ docs/v1.0.2/Point-Annotation.md | 54 +++ docs/v1.0.2/README.md | 108 ++++++ docs/v1.0.2/Routing-Api.md | 165 +++++++++ docs/v1.0.2/SDK-Error-code.md | 43 +++ docs/v1.0.2/Search-Api.md | 348 ++++++++++++++++++ docs/v1.0.2/Set-Regions.md | 55 +++ docs/v1.0.2/Set-Style.md | 86 +++++ docs/v1.0.2/Traffic-Vector-Overlay.md | 67 ++++ docs/v1.0.2/User-Location.md | 66 ++++ docs/v1.0.2/Version-History.md | 13 + docs/v1.0.2/Weather-API.md | 174 +++++++++ package.json | 6 +- src/App.js | 7 +- ...ivity.js => AddMapplsPinMarkerActivity.js} | 4 +- src/scenes/AnimatedMarker.js | 77 ++++ src/scenes/DrawCirclePolygonActivity.js | 61 +++ src/scenes/Home.js | 8 +- 34 files changed, 3253 insertions(+), 50 deletions(-) create mode 100644 docs/v1.0.2/Callout.md create mode 100644 docs/v1.0.2/Camera.md create mode 100644 docs/v1.0.2/Direction-Widget.md create mode 100644 docs/v1.0.2/Geofence-Widget.md create mode 100644 docs/v1.0.2/Getting-Started.md create mode 100644 docs/v1.0.2/Images.md create mode 100644 docs/v1.0.2/Light.md create mode 100644 docs/v1.0.2/Map-View.md create mode 100644 docs/v1.0.2/Nearby-Report.md create mode 100644 docs/v1.0.2/Nearby-Widget-Advance.md create mode 100644 docs/v1.0.2/Nearby-Widget.md create mode 100644 docs/v1.0.2/Place-Autocomplete.md create mode 100644 docs/v1.0.2/Point-Annotation.md create mode 100644 docs/v1.0.2/README.md create mode 100644 docs/v1.0.2/Routing-Api.md create mode 100644 docs/v1.0.2/SDK-Error-code.md create mode 100644 docs/v1.0.2/Search-Api.md create mode 100644 docs/v1.0.2/Set-Regions.md create mode 100644 docs/v1.0.2/Set-Style.md create mode 100644 docs/v1.0.2/Traffic-Vector-Overlay.md create mode 100644 docs/v1.0.2/User-Location.md create mode 100644 docs/v1.0.2/Version-History.md create mode 100644 docs/v1.0.2/Weather-API.md rename src/scenes/{AddElocMarkerActivity.js => AddMapplsPinMarkerActivity.js} (89%) create mode 100644 src/scenes/AnimatedMarker.js create mode 100644 src/scenes/DrawCirclePolygonActivity.js diff --git a/README.md b/README.md index e748c36..a78d919 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,7 @@ Powered with India's most comprehensive and robust mapping functionalities. | Version | Supported SDK Version | | ---- | ---- | +| [v1.0.2](docs/v1.0.2/README.md) | - Map SDK v1.0.7
- Place Search Widget v1.1.0
- GeoFence Widget v1.0.0
- Direction Widget v1.1.0
- Nearby UI Widget v1.0.0
- Mappls Polyline v1.0.0 | | [v1.0.1](docs/v1.0.1/README.md) | - Map SDK v1.0.3
- Place Search Widget v1.0.1
- GeoFence Widget v1.0.0
- Direction Widget v1.0.0
- Nearby UI Widget v1.0.0
- Mappls Polyline v1.0.0 | | [v1.0.0](docs/v1.0.0/README.md) | - Map SDK v1.0.0
- Place Search Widget v1.0.0
- GeoFence Widget v1.0.0
- Direction Widget v1.0.0
- Nearby UI Widget v1.0.0
- Mappls Polyline v1.0.0 | @@ -23,46 +24,57 @@ Powered with India's most comprehensive and robust mapping functionalities. | Version | Last Updated | Author | Release Note| | ---- | ---- | ---- | ---- | +| v1.0.7 | 05 June 2023 | Mappls API Team ([MA](https://github.com/mdakram)) ([ST](https://github.com/saksham66)) | - Security Improvements
- Bug Fixes & Improvements | +| v1.0.6 | 05 June 2023 | Mappls API Team ([MA](https://github.com/mdakram)) ([ST](https://github.com/saksham66)) | - Added `Cost Estimation` Api
- Bug Fixes | +| v1.0.5 | 02 May 2023 | Mappls API Team ([MA](https://github.com/mdakram)) ([ST](https://github.com/saksham66)) | - Added `responseLang` parameter in Autosuggest
- Added `lang` parameter in reverse geocode
- Bug Fixes | +| v1.0.4 | 12 April 2023 | Mappls API Team ([MA](https://github.com/mdakram)) ([ST](https://github.com/saksham66)) | - Bug Fixes | | v1.0.3 | 24 November 2022 | Mappls API Team ([MA](https://github.com/mdakram)) ([ST](https://github.com/saksham66)) | - Bug Fixes | -| v1.0.2 | 28 August 2022 | Mappls API Team ([MA](https://github.com/mdakram)) ([ST](https://github.com/saksham66)) | - Added Place click callback
- Update Place detail API
- Bug Fixes | -| v1.0.1 | 8 September 2022 | Mappls API Team ([MA](https://github.com/mdakram)) ([ST](https://github.com/saksham66)) | - Bug Fixes| -| v1.0.0 | 24 August 2022 | Mappls API Team ([MA](https://github.com/mdakram)) ([ST](https://github.com/saksham66)) | -Initial release | -For more details of previous versions , [click here](docs/v1.0.1/Version-History.md). +For more details of previous versions , [click here](docs/v1.0.2/Version-History.md). ## [Table Of Content](#Table-Of-Content) -- [Vector Map](docs/v1.0.1/Getting-Started.md) - * [Getting Started](docs/v1.0.1/Getting-Started.md#getting-started) - * [Installation](docs/v1.0.1/Getting-Started.md#installation) - * [Add Import](docs/v1.0.1/Getting-Started.md#added-import) - * [Add your API keys to the SDK](docs/v1.0.1/Getting-Started.md#add-your-api-keys-to-the-sdk) - * [Add a Mappls Map to your application](docs/v1.0.1/Getting-Started.md#add-a-mappls-map-to-your-application) +- [Vector Map](docs/v1.0.2/Getting-Started.md) + * [Getting Started](docs/v1.0.2/Getting-Started.md#getting-started) + * [Installation](docs/v1.0.2/Getting-Started.md#installation) + * [Add Import](docs/v1.0.2/Getting-Started.md#added-import) + * [Add your API keys to the SDK](docs/v1.0.2/Getting-Started.md#add-your-api-keys-to-the-sdk) + * [Add a Mappls Map to your application](docs/v1.0.2/Getting-Started.md#add-a-mappls-map-to-your-application) - Component - * [MapView](docs/v1.0.1/Map-View.md) - * [Light](docs/v1.0.1/Light.md) - * [Point Annotation](docs/v1.0.1/Point-Annotation.md) - * [Callout](docs/v1.0.1/Callout.md) - * [Camera](docs/v1.0.1/Camera.md) - * [User Location](docs/v1.0.1/User-Location.md) - * [Images](docs/v1.0.1/Images.md) + * [MapView](docs/v1.0.2/Map-View.md) + * [Light](docs/v1.0.2/Light.md) + * [Point Annotation](docs/v1.0.2/Point-Annotation.md) + * [Callout](docs/v1.0.2/Callout.md) + * [Camera](docs/v1.0.2/Camera.md) + * [User Location](docs/v1.0.2/User-Location.md) + * [Images](docs/v1.0.2/Images.md) +- [Mappls Traffic Overlay](docs/v1.0.2/Traffic-Vector-Overlay.md) +- [Set Country Regions](docs/v1.0.2/Set-Regions.md) +- [Set Mappls Map Style](docs/v1.0.2/Set-Style.md) + * [List of Available Styles](docs/v1.0.2/Set-Style.md#list-of-available-styles) + * [Set Mappls Style](docs/v1.0.2/Set-Style.md#set-mappls-style) + * [To enable/disable last selected style](docs/v1.0.2/Set-Style.md#to-enabledisable-last-selected-style) - Rest API Kit - * [Search API's](docs/v1.0.1/Search-Api.md) - * [Auto Suggest](docs/v1.0.1/Search-Api.md#auto-suggest) - * [Geocode](docs/v1.0.1/Search-Api.md#geocode) - * [Reverse Geocode](docs/v1.0.1/Search-Api.md#reverse-geocode) - * [Nearby Places](docs/v1.0.1/Search-Api.md#nearby-places) - * [Place Detail](docs/v1.0.1/Search-Api.md#place-details) - * [POI Along the Route](docs/v1.0.1/Search-Api.md#poi-along-the-route) - * [Routes & Navigation API](docs/v1.0.1/Routing-Api.md) - * [Routing API](docs/v1.0.1/Routing-Api.md#routing-api) - * [Driving Distance Matrix API](docs/v1.0.1/Routing-Api.md#driving-distance-matrix-api) -- [Mappls Search Widget](docs/v1.0.1/Place-Autocomplete.md) - * [Getting Started](docs/v1.0.1/Place-Autocomplete.md#getting-started) - * [Place Picker](docs/v1.0.1/Place-Autocomplete.md#placepicker) - * [Search Widget](docs/v1.0.1/Place-Autocomplete.md#search-widget) -- [Mappls Geofence Widget](docs/v1.0.1/Geofence-Widget.md) -- [Mappls Direction Widget](docs/v1.0.1/Direction-Widget.md) -- [Mappls Nearby Widget](docs/v1.0.1/Nearby-Widget.md) + * [Search API's](docs/v1.0.2/Search-Api.md) + * [Auto Suggest](docs/v1.0.2/Search-Api.md#auto-suggest) + * [Geocode](docs/v1.0.2/Search-Api.md#geocode) + * [Reverse Geocode](docs/v1.0.2/Search-Api.md#reverse-geocode) + * [Nearby Places](docs/v1.0.2/Search-Api.md#nearby-places) + * [Place Detail](docs/v1.0.2/Search-Api.md#place-details) + * [POI Along the Route](docs/v1.0.2/Search-Api.md#poi-along-the-route) + * [Routes & Navigation API](docs/v1.0.2/Routing-Api.md) + * [Routing API](docs/v1.0.2/Routing-Api.md#routing-api) + * [Driving Distance Matrix API](docs/v1.0.2/Routing-Api.md#driving-distance-matrix-api) + * [Weather Api](docs/v1.0.2/Weather-API.md) + * [Nearby Reports](docs/v1.0.2/Nearby-Report.md) +- [Mappls Search Widget](docs/v1.0.2/Place-Autocomplete.md) + * [Getting Started](docs/v1.0.2/Place-Autocomplete.md#getting-started) + * [Place Picker](docs/v1.0.2/Place-Autocomplete.md#placepicker) + * [Search Widget](docs/v1.0.2/Place-Autocomplete.md#search-widget) +- [Mappls Geofence Widget](docs/v1.0.2/Geofence-Widget.md) +- [Mappls Direction Widget](docs/v1.0.2/Direction-Widget.md) +- [Mappls Nearby Widget](docs/v1.0.2/Nearby-Widget.md) +- [SDK Error Codes](docs/v1.0.2/SDK-Error-code.md) +- [Version History](docs/v1.0.2/Version-History.md) - [Country List](https://github.com/mappls-api/mappls-rest-apis/blob/main/docs/countryISO.md)


diff --git a/android/app/build.gradle b/android/app/build.gradle index 401e2b2..7998341 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -186,8 +186,17 @@ android { } } + configurations.configureEach { + resolutionStrategy { + force 'org.jetbrains.kotlin:kotlin-stdlib:1.8.0' + force 'org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.8.0' + } + } + configurations.all { resolutionStrategy { + force 'org.jetbrains.kotlin:kotlin-stdlib:1.8.0' + force 'org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.8.0' force 'androidx.appcompat:appcompat:1.1.0' } } diff --git a/android/build.gradle b/android/build.gradle index e6d9f00..2684814 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -2,10 +2,10 @@ buildscript { ext { buildToolsVersion = "30.0.2" minSdkVersion = 21 - compileSdkVersion = 31 - targetSdkVersion = 31 + compileSdkVersion = 33 + targetSdkVersion = 33 ndkVersion = "21.4.7075529" - kotlinVersion = "1.6.10" + kotlinVersion = "1.8.0" } repositories { google() diff --git a/docs/v1.0.0/README.md b/docs/v1.0.0/README.md index 5950655..49f959b 100644 --- a/docs/v1.0.0/README.md +++ b/docs/v1.0.0/README.md @@ -26,7 +26,6 @@ Powered with India's most comprehensive and robust mapping functionalities. | v1.0.1 | 8 September 2022 | Mappls API Team ([MA](https://github.com/mdakram)) ([ST](https://github.com/saksham66)) | - Bug Fixes| | v1.0.0 | 24 August 2022 | Mappls API Team ([MA](https://github.com/mdakram)) ([ST](https://github.com/saksham66)) | -Initial release | -For more details of previous versions , [click here](docs/v1.0.1/Version-History.md). ## [Table Of Content](#Table-Of-Content) - [Vector Android Map](./Getting-Started.md) diff --git a/docs/v1.0.1/README.md b/docs/v1.0.1/README.md index 95bf550..0b0368d 100644 --- a/docs/v1.0.1/README.md +++ b/docs/v1.0.1/README.md @@ -28,7 +28,6 @@ Powered with India's most comprehensive and robust mapping functionalities. | v1.0.1 | 8 September 2022 | Mappls API Team ([MA](https://github.com/mdakram)) ([ST](https://github.com/saksham66)) | - Bug Fixes| | v1.0.0 | 24 August 2022 | Mappls API Team ([MA](https://github.com/mdakram)) ([ST](https://github.com/saksham66)) | -Initial release | -For more details of previous versions , [click here](docs/v1.0.1/Version-History.md). ## [Table Of Content](#Table-Of-Content) - [Vector Android Map](./Getting-Started.md) diff --git a/docs/v1.0.2/Callout.md b/docs/v1.0.2/Callout.md new file mode 100644 index 0000000..0f9a09a --- /dev/null +++ b/docs/v1.0.2/Callout.md @@ -0,0 +1,48 @@ +[

](https://www.mapmyindia.com/api) + +# Callout +## MapplsGL.Callout + +Callout that displays information about a selected annotation near the annotation. + +### Properties +| Prop | Type | Default | Required | Description | +| ---- | :--: | :-----: | :------: | :----------: | +| title | `string` | `none` | `false` | String that get's displayed in the default callout. | +| style | `any` | `none` | `false` | Style property for the Animated.View wrapper, apply animations to this | +| containerStyle | `any` | `none` | `false` | Style property for the native RCTMGLCallout container, set at your own risk. | +| contentStyle | `any` | `none` | `false` | Style property for the content bubble. | +| tipStyle | `any` | `none` | `false` | Style property for the triangle tip under the content. | +| textStyle | `any` | `none` | `false` | Style property for the title in the content bubble. | + + +


+ +For any queries and support, please contact: + +[

](https://about.mappls.com/api/) +Email us at [apisupport@mappls.com](mailto:apisupport@mappls.com) + + +![](https://www.mapmyindia.com/api/img/icons/support.png) +[Support](https://about.mappls.com/contact/) +Need support? contact us! + +

+

+ +[

](https://stackoverflow.com/questions/tagged/mappls-api)[![](https://www.mapmyindia.com/api/img/icons/blog.png)](https://about.mappls.com/blog/)[![](https://www.mapmyindia.com/api/img/icons/gethub.png)](https://github.com/Mappls-api)[

](https://www.npmjs.com/org/mapmyindia) + + + +[

](https://www.facebook.com/Mapplsofficial)[![](https://www.mapmyindia.com/june-newsletter/icon2.png)](https://twitter.com/mappls)[![](https://www.mapmyindia.com/newsletter/2017/aug/llinkedin.png)](https://www.linkedin.com/company/mappls/)[![](https://www.mapmyindia.com/june-newsletter/icon3.png)](https://www.youtube.com/channel/UCAWvWsh-dZLLeUU7_J9HiOA) + + + + +

@ Copyright 2022 CE Info Systems Ltd. All Rights Reserved.
+ +
Terms & Conditions | Privacy Policy | Supplier Sustainability Policy | Health & Safety Policy | Environmental Policy & CSR Report + +
Customer Care: +91-9999333223
+ diff --git a/docs/v1.0.2/Camera.md b/docs/v1.0.2/Camera.md new file mode 100644 index 0000000..a2a7dbe --- /dev/null +++ b/docs/v1.0.2/Camera.md @@ -0,0 +1,248 @@ +[

](https://www.mapmyindia.com/api) + +# Camera +## MapplsGL.Camera + + + +### props + | Prop | Type | Default | Required | Description | +| ---- | :--: | :-----: | :------: | :----------: | +| animationDuration | `number` | `2000` | `false` | The duration a camera update takes (in ms)| +| animationMode | `enum` | `'easeTo'` | `false` | The animationstyle when the camara updates. One of; `flyTo`, `easeTo`, `moveTo` | +| defaultSettings | `shape` | `none` | `false` | Default view settings applied on camera | +|   heading | `number` | `none` | `false` | Heading on map | +|   pitch | `number` | `none` | `false` | Pitch on map | +|   bounds | `shape` | `none` | `false` | Represents a rectangle in geographical coordinates marking the visible area of the map. | +|     ne | `array` | `none` | `true` | northEastCoordinates - North east coordinate of bound | +|     sw | `array` | `none` | `true` | southWestCoordinates - North east coordinate of bound | +|     paddingLeft | `number` | `none` | `false` | Left camera padding for bounds | +|     paddingRight | `number` | `none` | `false` | Right camera padding for bounds | +|     paddingTop | `number` | `none` | `false` | Top camera padding for bounds | +|     paddingBottom | `number` | `none` | `false` | Bottom camera padding for bounds | +|   zoomLevel | `number` | `none` | `false` | Zoom level of the map | +| centerCoordinate | `array` | `none` | `false` | Center coordinate on map [lng, lat] | +| centerMapplsPin| `string` | `none` | `false` | Center Mappls Pin on map | +| zoomLevel | `number` | `none` | `false` | Zoom level of the map | +| minZoomLevel | `number` | `none` | `false` | Min Zoom Preference | +| maxZoomLevel | `number` | `none` | `false` | Maximum Zoom Preference | +| maxBounds | `shape` | `none` | `false` | Restrict map panning so that the center is within these bounds | +|   ne | `array` | `none` | `true` | northEastCoordinates - North east coordinate of bound | +|   sw | `array` | `none` | `true` | southWestCoordinates - South west coordinate of bound | +| followUserLocation | `bool` | `none` | `false` | Should the map orientation follow the user's. | +| followUserMode | `enum` | `none` | `false` | The mode used to track the user location on the map. One of; "normal", "compass", "course". Each mode string is also available as a member on the `MapmyIndiaGL.UserTrackingModes` object. `Follow` (normal), `FollowWithHeading` (compass), `FollowWithCourse` (course). NOTE: `followUserLocation` must be set to `true` for any of the modes to take effect| +| followZoomLevel | `number` | `none` | `false` | The zoomLevel on map while followUserLocation is set to `true` | +| followPitch | `number` | `none` | `false` | The pitch on map while followUserLocation is set to `true` | +| followHeading | `number` | `none` | `false` | The heading on map while followUserLocation is set to `true` | +| triggerKey | `any` | `none` | `false` | Manually update the camera - helpful for when props did not update, however you still want the camera to move | +| onUserTrackingModeChange | `func` | `none` | `false` | When tracking mode is changed | + + + +### methods + +#### fitBounds(northEastCoordinates, southWestCoordinates[, padding][, animationDuration]) + + + +Map camera transitions to fit provided bounds + + + +##### arguments + + +| Name | Type | Required | Description | +| ---- | :--: | :------: | :----------: | +| `northEastCoordinates` | `Array` | `Yes` | North east coordinate of bound | +| `southWestCoordinates` | `Array` | `Yes` | South west coordinate of bound | +| `padding` | `Number` | `No` | Camera padding for bound | +| `animationDuration` | `Number` | `No` | Duration of camera animation | + + + + + +```javascript + +this.camera.fitBounds([lng, lat], [lng, lat]) + +this.camera.fitBounds([lng, lat], [lng, lat], 20, 1000) // padding for all sides + +this.camera.fitBounds([lng, lat], [lng, lat], [verticalPadding, horizontalPadding], 1000) + +this.camera.fitBounds([lng, lat], [lng, lat], [top, right, bottom, left], 1000) + +``` + +#### flyTo(coordinates, animationDuration]) +Map camera will fly to new coordinate +##### arguments + +| Name | Type | Required | Description | +| ---- | :--: | :------: | :----------: | +| `coordinates` | `Array` | `Yes` | Coordinates that map camera will jump too | +| `animationDuration` | `Number` | `No` | Duration of camera animation | + +```javascript +this.camera.flyTo([lng, lat]) +this.camera.flyTo([lng, lat], 12000) +``` +#### flyWithMapplsPin(mapplsPin, animationDuration]) +Map camera will fly to new coordinate +##### arguments + +| Name | Type | Required | Description | +| ---- | :--: | :------: | :----------: | +| `mapplsPin` | `string` | `Yes` | Coordinates that map camera will jump too | +| `animationDuration` | `Number` | `No` | Duration of camera animation | + +```javascript +this.camera.flyWithMapplsPin("MMI000") +this.camera.flyWithMapplsPin("MMI000", 12000) +``` + + + +#### moveTo(coordinates, animationDuration) + +Map camera will move to new coordinate at the same zoom level +##### arguments + + +| Name | Type | Required | Description | +| ---- | :--: | :------: | :----------: | +| `coordinates` | `Array` | `Yes` | Coordinates that map camera will move too | +| `animationDuration` | `Number` | `No` | Duration of camera animation | +```javascript + +this.camera.moveTo([lng, lat], 200) // eases camera to new location based on duration + +this.camera.moveTo([lng, lat]) // snaps camera to new location without any easing + +``` +#### moveWithMapplsPin(mapplsPin, animationDuration) + +Map camera will move to new coordinate at the same zoom level +##### arguments + + +| Name | Type | Required | Description | +| ---- | :--: | :------: | :----------: | +| `mapplsPin` | `string` | `Yes` | Coordinates that map camera will move too | +| `animationDuration` | `Number` | `No` | Duration of camera animation | +```javascript + +this.camera.moveWithMapplsPin("MMI000", 200) // eases camera to new location based on duration + +this.camera.moveWithMapplsPin("MMI000") // snaps camera to new location without any easing + +``` + +#### zoomTo(zoomLevel[, animationDuration]) + + + +Map camera will zoom to specified level + + + +##### arguments + +| Name | Type | Required | Description | +| ---- | :--: | :------: | :----------: | +| `zoomLevel` | `Number` | `Yes` | Zoom level that the map camera will animate too | +| `animationDuration` | `Number` | `No` | Duration of camera animation | + + + + + +```javascript + +this.camera.zoomTo(16) + +this.camera.zoomTo(16, 100) + +``` + + + + +#### setCamera(config) + + + +Map camera will perform updates based on provided config. Advanced use only! + + + +##### arguments + +| Name | Type | Required | Description | +| ---- | :--: | :------: | :----------: | +| `config` | `Object` | `Yes` | Camera configuration | + + + + + +```javascript + +this.camera.setCamera({ + +centerCoordinate: [lng, lat], + +zoomLevel: 16, + +animationDuration: 2000, + +}) + + + +this.camera.setCamera({ + +stops: [ + +{ pitch: 45, animationDuration: 200 }, + +{ heading: 180, animationDuration: 300 }, + +] + +}) + +``` + + +


+ +For any queries and support, please contact: + +[

](https://about.mappls.com/api/) +Email us at [apisupport@mappls.com](mailto:apisupport@mappls.com) + + +![](https://www.mapmyindia.com/api/img/icons/support.png) +[Support](https://about.mappls.com/contact/) +Need support? contact us! + +

+

+ +[

](https://stackoverflow.com/questions/tagged/mappls-api)[![](https://www.mapmyindia.com/api/img/icons/blog.png)](https://about.mappls.com/blog/)[![](https://www.mapmyindia.com/api/img/icons/gethub.png)](https://github.com/Mappls-api)[

](https://www.npmjs.com/org/mapmyindia) + + + +[

](https://www.facebook.com/Mapplsofficial)[![](https://www.mapmyindia.com/june-newsletter/icon2.png)](https://twitter.com/mappls)[![](https://www.mapmyindia.com/newsletter/2017/aug/llinkedin.png)](https://www.linkedin.com/company/mappls/)[![](https://www.mapmyindia.com/june-newsletter/icon3.png)](https://www.youtube.com/channel/UCAWvWsh-dZLLeUU7_J9HiOA) + + + + +

@ Copyright 2022 CE Info Systems Ltd. All Rights Reserved.
+ +
Terms & Conditions | Privacy Policy | Supplier Sustainability Policy | Health & Safety Policy | Environmental Policy & CSR Report + +
Customer Care: +91-9999333223
+ \ No newline at end of file diff --git a/docs/v1.0.2/Direction-Widget.md b/docs/v1.0.2/Direction-Widget.md new file mode 100644 index 0000000..7da0595 --- /dev/null +++ b/docs/v1.0.2/Direction-Widget.md @@ -0,0 +1,213 @@ +[

](https://www.mapmyindia.com/api) + +# Mappls Direction Widget React Native + +## Getting started + +`npm install mappls-direction-widget-react-native` + +* Install peerDependencies +~~~javascript +npm i mappls-map-react-native +~~~ + + +* If using React-native<0.60 + +` react-native link mappls-direction-widget-react-native` + + +### Installation + + +### Android + +* Add followling line in `android/build.gradle` file:- + +```diff +allprojects { + repositories { + mavenLocal() + maven { +// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm + url("$rootDir/../node_modules/react-native/android") + } + maven { + // Android JSC is installed from npm + url("$rootDir/../node_modules/jsc-android/dist") + } + + ++ maven { url 'https://maven.mappls.com/repository/mappls/'} + + google() + jcenter() + maven { url 'https://www.jitpack.io' } + + } + +} +``` + +* Add followling line in `android/app/build.gradle` file:- + + +```diff +defaultConfig { + +applicationId "com.example" + +minSdkVersion rootProject.ext.minSdkVersion + +targetSdkVersion rootProject.ext.targetSdkVersion + +versionCode 1 + +versionName "1.0" + ++ multiDexEnabled true + +} ++ dataBinding { ++ enabled true ++ } +``` + +### ios + +* run **pod install** from ios folder + +## Usage + +#### Step 1: Import +```javascript +import MapplsDirectionWidget from "mappls-direction-widget-react-native" +import MapplsGL from 'mappls-map-react-native'; +``` + +#### Step 2. Initialization +Initialize the SDK with your keys. +```javascript +// for map sdk +MapplsGL.setMapSDKKey(mapSDKKey);//place your mapsdkKey +MapplsGL.setRestAPIKey(restAPIKey);//your restApiKey +MapplsGL.setAtlasClientId(atlasClientId);//your atlasClientId key +MapplsGL.setAtlasClientSecret(atlasClientSecret); //your atlasClientSecret key +``` + +#### Step 3: Open MapplsDirectionWidget + +```javascript + try { + const data = await MapplsDirectionWidget.openDirectionWidget({}); + console.log(JSON.stringify(data)); + } catch (e) { + //error log + } +``` +#### Request Props +1. resource(String)`: **Below are the available resource:** + - DirectionsCriteria.RESOURCE_ROUTE **(Default)**: to calculate a route & its duration without considering traffic conditions. + - DirectionsCriteria.RESOURCE_ROUTE_ETA get the updated duration of a route considering live traffic; Applicable for India only "region=ind" and "rtype=1" is not supported. This is different from route_traffic; since this doesn't search for a route considering traffic, it only applies delays to the default route. + + - DirectionsCriteria.RESOURCE_ROUTE_TRAFFIC: + to search for routes considering live traffic. + +2. `showAlternative(Boolean)`: Show alternative routes. +3. `profile(String)`: **Below are the available profile:** + - DirectionsCriteria.PROFILE_DRIVING **(Default)**:Meant for car routing + - DirectionsCriteria.PROFILE_WALKING: Meant for pedestrian routing. Routing with this profile is restricted to route_adv only. region & rtype request parameters are not supported in pedestrian routing + - DirectionsCriteria.PROFILE_BIKING:Meant for two-wheeler routing. Routing with this profile is restricted to route_adv only. region & rtype request parameters are not supported in two-wheeler routing. + - DirectionsCriteria.PROFILE_TRUCKING:Meant for Truck routing. Routing with this profile is restricted to route_adv only. region & rtype request parameters are not supported in truck routing. +4. `overview(String)`: Add overview geometry either full, simplified according to highest zoom level it could be display on, or not at all. **Below are the available value:** + - DirectionsCriteria.OVERVIEW_FULL + - DirectionsCriteria.OVERVIEW_FALSE + - DirectionsCriteria.OVERVIEW_SIMPLIFIED +5. `steps(Boolean)`: Return route steps for each route leg. Possible values are true/false. By default it will be used as false. +6. `excludes(List)` : Additive list of road classes to avoid, order does not matter. **Below are the available value:** + - DirectionsCriteria.EXCLUDE_FERRY + - DirectionsCriteria.EXCLUDE_MOTORWAY + - DirectionsCriteria.EXCLUDE_TOLL +7. `showStartNavigation(Boolean)`: To show the Start Navigation button if the origin is current location. +8. `destination`: You can use this to pass the destination in direction widget: + - `destination:{longitude:77.56,latitude:28.67,name:"MapmyIndia",address:"Okhla,New Delhi"}`: It takes coordinate, place name and place address + - `destination:{mapplsPin:"MMI000",name:"MapmyIndia",address:"Okhla,New Delhi"}`: It takes mapplsPin, place name and place address +9. `source`: You can use this to pass the source in direction widget(Only for IOS): + - `source:{longitude:77.56,latitude:28.67,name:"MapmyIndia",address:"Okhla,New Delhi"}`: It takes coordinate, place name and place address + - `source:{mapplsPin:"MMI000",name:"MapmyIndia",address:"Okhla,New Delhi"}`: It takes mapplsPin, place name and place address +10. `searchPlaceOption(PlaceOptions`): To set the properties of search widget + + +#### PlaceOptions +1. `location(Array)`: set location around which your search will appear. Ex. `[77.56,28.34]` +2. `filter(String)`: this parameter helps you restrict the result either by mentioning a bounded area or to certain mapplsPin (6 digit code to any poi, locality, city, etc.), below mentioned are the both types: + + - `filter` = bounds: lat1, lng1; lat2, lng2 (latitude, longitude) {e.g. filter("bounds: 28.598882, 77.212407; 28.467375, 77.353513") + - `filter` = cop: {mapplsPin} (string) {e.g. filter("cop:YMCZ0J") + +3. `historyCount(number)`: Maximum number of history results appear. **(Android )** + +4. `zoom(number)`: takes the zoom level of the current scope of the map (min: 4, max: 18). + +5. `saveHistory(Boolean)`: If it sets to `true` it shows the history selected data. **(Android )** +6. `pod(String)`: 1. it takes in the place type code which helps in restricting the results to certain chosen type.**Below mentioned are the codes for the pod** + + - PlaceOptionsConstants.POD_SUB_LOCALITY + - PlaceOptionsConstants.POD_LOCALITY + - PlaceOptionsConstants.POD_CITY + - PlaceOptionsConstants.POD_VILLAGE + - PlaceOptionsConstants.POD_SUB_DISTRICT + - PlaceOptionsConstants.POD_DISTRICT + - PlaceOptionsConstants.POD_STATE + - PlaceOptionsConstants.POD_SUB_SUB_LOCALITY +7. `tokenizeAddress(Boolean)`: provides the different address attributes in a structured object. + +8. `backgroundColor(HexColor)`: to set the background color of the widget + +9. `toolbarColor(HexColor)`: to set the toolbar color of the widget. + +10. `hint(String)`: To set the hint on the Search view of the widget.**(Android)** +11. `attributionHorizontalAlignment(int)`: To set the vertical alignment for attribution. **Below mentioned are the values:** + + - PlaceOptionsConstants.GRAVITY_LEFT + - PlaceOptionsConstants.GRAVITY_CENTER + - PlaceOptionsConstants.GRAVITY_RIGHT +12. `attributionVerticalAlignment(int)`: To set the horizontal alignment for attribution. **Below mentioned are the values:** + + - PlaceOptionsConstants.GRAVITY_TOP + - PlaceOptionsConstants.GRAVITY_BOTTOM' +13. `logoSize(int)`: To set the logo size. **Below mentioned are the values:** + + - PlaceOptionsConstants.SIZE_SMALL + - PlaceOptionsConstants.SIZE_MEDIUM + - PlaceOptionsConstants.SIZE_LARGE + +


+ +For any queries and support, please contact: + +[

](https://about.mappls.com/api/) +Email us at [apisupport@mappls.com](mailto:apisupport@mappls.com) + + +![](https://www.mapmyindia.com/api/img/icons/support.png) +[Support](https://about.mappls.com/contact/) +Need support? contact us! + +

+

+ +[

](https://stackoverflow.com/questions/tagged/mappls-api)[![](https://www.mapmyindia.com/api/img/icons/blog.png)](https://about.mappls.com/blog/)[![](https://www.mapmyindia.com/api/img/icons/gethub.png)](https://github.com/Mappls-api)[

](https://www.npmjs.com/org/mapmyindia) + + + +[

](https://www.facebook.com/Mapplsofficial)[![](https://www.mapmyindia.com/june-newsletter/icon2.png)](https://twitter.com/mappls)[![](https://www.mapmyindia.com/newsletter/2017/aug/llinkedin.png)](https://www.linkedin.com/company/mappls/)[![](https://www.mapmyindia.com/june-newsletter/icon3.png)](https://www.youtube.com/channel/UCAWvWsh-dZLLeUU7_J9HiOA) + + + + +

@ Copyright 2022 CE Info Systems Ltd. All Rights Reserved.
+ +
Terms & Conditions | Privacy Policy | Supplier Sustainability Policy | Health & Safety Policy | Environmental Policy & CSR Report + +
Customer Care: +91-9999333223
diff --git a/docs/v1.0.2/Geofence-Widget.md b/docs/v1.0.2/Geofence-Widget.md new file mode 100644 index 0000000..e2dd7bd --- /dev/null +++ b/docs/v1.0.2/Geofence-Widget.md @@ -0,0 +1,158 @@ +[

](https://www.mapmyindia.com/api) + +# Mappls Geofence Widget + +## Getting started + +`npm install mappls-geofence-widget-react-native` + +* Install peerDependencies +~~~javascript +npm i mappls-map-react-native +~~~ + + +* If using React-native<0.60 + +` react-native link mappls-geofence-widget-react-native` + + +### Installation + + +### Android + +* Add followling line in `android/build.gradle` file:- + +```diff +allprojects { + repositories { + mavenLocal() + maven { +// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm + url("$rootDir/../node_modules/react-native/android") + } + maven { + // Android JSC is installed from npm + url("$rootDir/../node_modules/jsc-android/dist") + } ++ maven { url 'https://maven.mappls.com/repository/mappls/'} + google() + jcenter() + maven { url 'https://www.jitpack.io' } + } +} +``` + +* Add followling line in `android/app/build.gradle` file:- + + +```diff +defaultConfig { +applicationId "com.example" +minSdkVersion rootProject.ext.minSdkVersion +targetSdkVersion rootProject.ext.targetSdkVersion +versionCode 1 +versionName "1.0" ++ multiDexEnabled true +} +``` + +### ios + +* run **pod install** from ios folder + +## Usage + +#### Step 1: Import +```javascript +import MapplsGeoFence from 'mappls-geofence-widget-react-native'; +import MapplsGL from 'mappls-map-react-native'; +``` + +#### Step 2. Initialization +Initialize the SDK with your keys. +```javascript +// for map sdk +MapplsGL.setMapSDKKey(mapSDKKey);//place your mapsdkKey +MapplsGL.setRestAPIKey(restAPIKey);//your restApiKey +MapplsGL.setAtlasClientId(atlasClientId);//your atlasClientId key +MapplsGL.setAtlasClientSecret(atlasClientSecret); //your atlasClientSecret key +``` + +#### Step 3: Open MapplsGeoFence Widget + +```javascript +MapplsGeoFence.openGeoFenceWidget({minRadius: 2000, maxRadius: 10000}) +.then(e => {console.log(e)}) +.catch(err => console.log("error catch search:", err.message)) +``` +#### Request Props +1. **circleFillColor(string):** To change Circle Fill colors +2. **circleFillOutlineColor(string):** To change circle Outline color +3. **circleOutlineWidth(number):** To change the circle outline width +4. **draggingLineColor(string):** To change the dragging line of Polygon edges and circle radius changing line. +5. **maxRadius(number):** To set maximum radius of circle +6. **minRadius(number):** To set minimum radius of circle. +7. **polygonDrawingBackgroundColor(string):** To change the color of Polygon drawing board color. +8. **polygonDrawingLineColor(string):** To set the polygon sketch drawing line. +9. **polygonFillColor(String):** To change fill color of polygon +10. **polygonFillOutlineColor(string):** To change outline color of polygon +11. **polygonOutlineWidth(number):** To set the polygon outline width +12. **radiusInterval(number):** To set the step size of radius changing +13. **seekbarCornerRadius(number):** To change seekbar corner radius +14. **polygonCreationMode(number):** To change the creation mode of polygon. **Below mentioned are the values:** + * MapplsGeoFence.POLYGON_CREATION_MODE_DRAW:User can draw on screen to create polygon + * MapplsGeoFence.POLYGON_CREATION_MODE_TAP : User can tap on the screen to create polygon +15. **toolbarTitle(string):** To change the title of toolbar . +16. **toolbarColor(string):** To change the color of toolbar +17. **toolbarTintColor(string): ** To change done button tint color. +18. [ **initialiseGeoFence(GeoFence):** ](#Geofence)Set initial properties for Geofence. Takes GeoFence Object as parameter. +19. **simplifyOnIntersection(boolean):** To auto correct self intersecting polygon +20. **maxEdgesInPolygon(number):** To restrict number of points in a polygon +21. **convertPointsToClockWise(string):** To get Polygon points in clockwise/anti-clockwise directions. **Below mentioned are the values:** + * MapplsGeoFence.CONVERT_POINTS_ORIENTATION_NONE + * MapplsGeoFence.CONVERT_POINTS_ORIENTATION_ANTICLOCKWISE + * MapplsGeoFence.CONVERT_POINTS_ORIENTATION_CLOCKWISE +22. **doneButtonColor(string):** To change done button color. +23. **doneButtonTintColor(string):** To change done button tint color. + +### Geofence +1. **isPolygon (boolean):** To set if polygon or circle. +2. **circleRadius(number):** To set the radius of circle. +3. **circleCenter(Array)**: To set the center of circle. +4. **polygon(Array>>)** : To set the polygon points. +5. **polygonType(String)** : To set the type of polygon. **Below mentioned are the values:** + * MapplsGeoFence.POLYGON_TYPE_NORMAL + * MapplsGeoFence.POLYGON_TYPE_QUADRILATERAL + + +


+ +For any queries and support, please contact: + +[

](https://about.mappls.com/api/) +Email us at [apisupport@mappls.com](mailto:apisupport@mappls.com) + + +![](https://www.mapmyindia.com/api/img/icons/support.png) +[Support](https://about.mappls.com/contact/) +Need support? contact us! + +

+

+ +[

](https://stackoverflow.com/questions/tagged/mappls-api)[![](https://www.mapmyindia.com/api/img/icons/blog.png)](https://about.mappls.com/blog/)[![](https://www.mapmyindia.com/api/img/icons/gethub.png)](https://github.com/Mappls-api)[

](https://www.npmjs.com/org/mapmyindia) + + + +[

](https://www.facebook.com/Mapplsofficial)[![](https://www.mapmyindia.com/june-newsletter/icon2.png)](https://twitter.com/mappls)[![](https://www.mapmyindia.com/newsletter/2017/aug/llinkedin.png)](https://www.linkedin.com/company/mappls/)[![](https://www.mapmyindia.com/june-newsletter/icon3.png)](https://www.youtube.com/channel/UCAWvWsh-dZLLeUU7_J9HiOA) + + + + +

@ Copyright 2022 CE Info Systems Ltd. All Rights Reserved.
+ +
Terms & Conditions | Privacy Policy | Supplier Sustainability Policy | Health & Safety Policy | Environmental Policy & CSR Report + +
Customer Care: +91-9999333223
diff --git a/docs/v1.0.2/Getting-Started.md b/docs/v1.0.2/Getting-Started.md new file mode 100644 index 0000000..643e39b --- /dev/null +++ b/docs/v1.0.2/Getting-Started.md @@ -0,0 +1,268 @@ + +[

](https://www.mapmyindia.com/api) + +# Mappls React Native SDK + +**Easy To Integrate Maps & Location APIs & SDKs For Android Applications** + +Powered with India's most comprehensive and robust mapping functionalities. + +1. You can get your api key to be used in this document here: [https://about.mappls.com/api/signup](https://about.mappls.com/api/signup) + +2. The sample code is provided to help you understand the basic functionality of Mappls maps & REST APIs working on **Android** native development platform. + +4. Explore through [200+ countries & territories](https://github.com/MapmyIndia/mapmyindia-rest-api/blob/master/docs/countryISO.md) with **Global Search, Routing and Mapping APIs & SDKs** by Mappls. + +## [Getting Started](#getting-started) + +### [Installation](#installation) + +**Dependencies** + +* [node](https://nodejs.org) +* [npm](https://www.npmjs.com/) +* [React Native](https://facebook.github.io/react-native/): recommended version 0.60 or greater + +**npm** +~~~ +npm install mappls-map-react-native --save +~~~ + +#### IOS Installation +**React-Native >= `0.60.0`** + +If you are using autolinking feature introduced in React-Native `0.60.0` you do not need any additional steps. +Just run `pod install` and rebuild your project. + +**React-Native < `0.60.0`** + +##### Using CocoaPods +To install with CocoaPods, add the following to your `Podfile`: +``` + # Mappls + pod 'mappls-map-react-native', :path => '../node_modules/mappls-map-react-native' + + # Make also sure you have use_frameworks! enabled + use_frameworks! + +``` + +Then run `pod install` and rebuild your project. + +If you cannot use `use_frameworks!` for some reason, please see our workaround - [https://github.com/react-native-mapbox-gl/maps/pull/714](https://github.com/react-native-mapbox-gl/maps/pull/714) + +#### Android Installation +**React-Native >= `0.60.0`** +If you are using autolinking feature introduced in React-Native `0.60.0` have to add only following lines in `android/build.gradle` file:- + +* We need to add an additional repository in order to get our dependencies. +```diff +allprojects { + repositories { + mavenLocal() + google() + jcenter() + maven { url "https://jitpack.io" } ++ maven { url 'https://maven.mappls.com/repository/mappls/'} + maven { + // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm + url "$rootDir/../node_modules/react-native/android" + } + } +} +``` + +**React-Native < `0.60.0`** + +`react-native link` should get you almost there, +however we need to add some additional lines to `build.gradle`. + + +## 1. `android/build.gradle` +We need to add an additional repository in order to get our dependencies. + +* `https://jitpack.io` +* `https://maven.mappls.com/repository/mappls/ ` +```diff +allprojects { + repositories { + mavenLocal() + google() + jcenter() ++ maven { url "https://jitpack.io" } ++ maven { url 'https://maven.mappls.com/repository/mappls/'} + maven { + // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm + url "$rootDir/../node_modules/react-native/android" + } + } +} +``` + +Make sure that your `buildscript > ext` settings are correct. +We want to be on `33` or higher: + +``` +buildscript { + ext { + buildToolsVersion = "28.0.3" + compileSdkVersion = 33 + targetSdkVersion = 33 + } +} +``` + +Everything below should've been covered by `react-native link`, +however it never hurts to make sure it actually did what it was supposed to + +--- + + +## 2. `android/app/build.gradle` + +Add project under `dependencies` + +```diff +dependencies { + implementation fileTree(dir: "libs", include: ["*.jar"]) + implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}" + implementation "com.facebook.react:react-native:+" // From node_modules ++ implementation project(':mappls-map-react-native') +} +``` + +You can set the Support Library version or the okhttp version if you use other modules that depend on them: +* `supportLibVersion "28.0.0"` +* `okhttpVersion "3.12.1"` + + +## 3. `android/settings.gradle` + +Include project, so gradle knows where to find the project + +```diff +rootProject.name = + ++include ':mappls-map-react-native' ++project(':mappls-map-react-native').projectDir = new File(rootProject.projectDir, '../node_modules/mappls-map-react-native/android/rctmgl') + +include ':app'¬ +``` + +## 4. `android/app/src/main/java/com/PROJECT_NAME/MainApplication.java` + +We need to register our package + +Add `import com.mappls.sdk.maps.rctmgl.RCTMGLPackage;` +as an import statement and +`new RCTMGLPackage()` within the `getPackages()` method + +```diff +package ; + +import android.app.Application; + +import com.facebook.react.ReactApplication; +import com.facebook.react.ReactNativeHost; +import com.facebook.react.ReactPackage; +import com.facebook.react.shell.MainReactPackage; +import com.facebook.soloader.SoLoader; ++import com.mappls.sdk.maps.rctmgl.RCTMGLPackage; + +import java.util.Arrays; +import java.util.List; + +public class MainApplication extends Application implements ReactApplication { + + private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) { + @Override + public boolean getUseDeveloperSupport() { + return BuildConfig.DEBUG; + } + + @Override + protected List getPackages() { + return Arrays.asList( + new MainReactPackage(), ++ new RCTMGLPackage() + ); + } + + @Override + protected String getJSMainModuleName() { + return "index"; + } + }; + + @Override + public ReactNativeHost getReactNativeHost() { + return mReactNativeHost; + } + + @Override + public void onCreate() { + super.onCreate(); + SoLoader.init(this, /* native exopackage */ false); + } +} + +``` + + +### [Added Import](#added-import) +~~~javascript +import MapplsGL from 'mappls-map-react-native'; +~~~ + +### [Add your API keys to the SDK](#add-your-api-keys-to-the-sdk) +*Add your API keys to the SDK before using map* +~~~javascript +MapplsGL.setMapSDKKey(mapSDKKey); //place your mapsdkKey +MapplsGL.setRestAPIKey(restAPIKey); //your restApiKey +MapplsGL.setAtlasClientId(atlasClientId); //your atlasClientId key +MapplsGL.setAtlasClientSecret(atlasClientSecret); //your atlasClientSecret key +~~~ + +*You cannot use the Mappls Map React Native SDK without these function calls. You will find your keys in your API Dashboard.* + +### [Add a Mappls Map to your application](#add-a-mappls-map-to-your-application) +~~~javascript + console.log(error.code + ' ' + error.message)} + style={{flex: 1}}> + + +~~~ + +


+ +For any queries and support, please contact: + +[

](https://about.mappls.com/api/) +Email us at [apisupport@mappls.com](mailto:apisupport@mappls.com) + + +![](https://www.mapmyindia.com/api/img/icons/support.png) +[Support](https://about.mappls.com/contact/) +Need support? contact us! + +

+

+ +[

](https://stackoverflow.com/questions/tagged/mappls-api)[![](https://www.mapmyindia.com/api/img/icons/blog.png)](https://about.mappls.com/blog/)[![](https://www.mapmyindia.com/api/img/icons/gethub.png)](https://github.com/Mappls-api)[

](https://www.npmjs.com/org/mapmyindia) + + + +[

](https://www.facebook.com/Mapplsofficial)[![](https://www.mapmyindia.com/june-newsletter/icon2.png)](https://twitter.com/mappls)[![](https://www.mapmyindia.com/newsletter/2017/aug/llinkedin.png)](https://www.linkedin.com/company/mappls/)[![](https://www.mapmyindia.com/june-newsletter/icon3.png)](https://www.youtube.com/channel/UCAWvWsh-dZLLeUU7_J9HiOA) + + + + +

@ Copyright 2022 CE Info Systems Ltd. All Rights Reserved.
+ +
Terms & Conditions | Privacy Policy | Supplier Sustainability Policy | Health & Safety Policy | Environmental Policy & CSR Report + +
Customer Care: +91-9999333223
diff --git a/docs/v1.0.2/Images.md b/docs/v1.0.2/Images.md new file mode 100644 index 0000000..a41cdba --- /dev/null +++ b/docs/v1.0.2/Images.md @@ -0,0 +1,44 @@ +[

](https://www.mapmyindia.com/api) + +# Images +## MapplsGL.Images + +Images defines the images used in Symbol etc layers + +### props + +| Prop | Type | Default | Required | Description | +| ---- | :--: | :-----: | :------: | :----------: | +| images | `object` | `none` | `false` | Specifies the external images in key-value pairs required for the shape source.
If you have an asset under Image.xcassets on iOS and the drawables directory on android
you can specify an array of string names with assets as the key `{ assets: ['pin'] }`. | + + + +


+ +For any queries and support, please contact: + +[

](https://about.mappls.com/api/) +Email us at [apisupport@mappls.com](mailto:apisupport@mappls.com) + + +![](https://www.mapmyindia.com/api/img/icons/support.png) +[Support](https://about.mappls.com/contact/) +Need support? contact us! + +

+

+ +[

](https://stackoverflow.com/questions/tagged/mappls-api)[![](https://www.mapmyindia.com/api/img/icons/blog.png)](https://about.mappls.com/blog/)[![](https://www.mapmyindia.com/api/img/icons/gethub.png)](https://github.com/Mappls-api)[

](https://www.npmjs.com/org/mapmyindia) + + + +[

](https://www.facebook.com/Mapplsofficial)[![](https://www.mapmyindia.com/june-newsletter/icon2.png)](https://twitter.com/mappls)[![](https://www.mapmyindia.com/newsletter/2017/aug/llinkedin.png)](https://www.linkedin.com/company/mappls/)[![](https://www.mapmyindia.com/june-newsletter/icon3.png)](https://www.youtube.com/channel/UCAWvWsh-dZLLeUU7_J9HiOA) + + + + +

@ Copyright 2022 CE Info Systems Ltd. All Rights Reserved.
+ +
Terms & Conditions | Privacy Policy | Supplier Sustainability Policy | Health & Safety Policy | Environmental Policy & CSR Report + +
Customer Care: +91-9999333223
diff --git a/docs/v1.0.2/Light.md b/docs/v1.0.2/Light.md new file mode 100644 index 0000000..39e7643 --- /dev/null +++ b/docs/v1.0.2/Light.md @@ -0,0 +1,112 @@ +[

](https://www.mapmyindia.com/api) + +# Light +## MapplsGL.Light + +Light represents the light source for extruded geometries + +### props +| Prop | Type | Default | Required | Description | +| ---- | :--: | :-----: | :------: | :----------: | +| style | `custom` | `none` | `false` | Customizable style attributes | + + +### styles + +* anchor
+* position
+* color
+* intensity
+ +___ + +#### Name +`anchor` + +#### Description +Whether extruded geometries are lit relative to the map or viewport. + +#### Type +`enum` +#### Default Value +`viewport` + +#### Supported Values +**map** - The position of the light source is aligned to the rotation of the map.
+**viewport** - The position of the light source is aligned to the rotation of the viewport.
+ + + +___ + +#### Name +`position` + +#### Description +Position of the light source relative to lit (extruded) geometries, in [r radial coordinate, a azimuthal angle, p polar angle] where r indicates the distance from the center of the base of an object to its light, a indicates the position of the light relative to 0° (0° when `light.anchor` is set to `viewport` corresponds to the top of the viewport, or 0° when `light.anchor` is set to `map` corresponds to due north, and degrees proceed clockwise), and p indicates the height of the light (from 0°, directly above, to 180°, directly below). + +#### Type +`array` +#### Default Value +`[1.15,210,30]` + + + +___ + +#### Name +`color` + +#### Description +Color tint for lighting extruded geometries. + +#### Type +`color` +#### Default Value +`#ffffff` + + + +___ + +#### Name +`intensity` + +#### Description +Intensity of lighting (on a scale from 0 to 1). Higher numbers will present as more extreme contrast. + +#### Type +`number` +#### Default Value +`0.5` + +#### Minimum +`0` + +#### Maximum +`1` + +


+ +For any queries and support, please contact: + +[

](https://about.mappls.com/api/) +Email us at [apisupport@mappls.com](mailto:apisupport@mappls.com) + + +![](https://www.mapmyindia.com/api/img/icons/support.png) +[Support](https://about.mappls.com/contact/) +Need support? contact us! + +

+

+ +[

](https://stackoverflow.com/questions/tagged/mappls-api)[![](https://www.mapmyindia.com/api/img/icons/blog.png)](https://about.mappls.com/blog/)[![](https://www.mapmyindia.com/api/img/icons/gethub.png)](https://github.com/Mappls-api)[

](https://www.npmjs.com/org/mapmyindia) + +[

](https://www.facebook.com/Mapplsofficial)[![](https://www.mapmyindia.com/june-newsletter/icon2.png)](https://twitter.com/mappls)[![](https://www.mapmyindia.com/newsletter/2017/aug/llinkedin.png)](https://www.linkedin.com/company/mappls/)[![](https://www.mapmyindia.com/june-newsletter/icon3.png)](https://www.youtube.com/channel/UCAWvWsh-dZLLeUU7_J9HiOA) + +

@ Copyright 2022 CE Info Systems Ltd. All Rights Reserved.
+ +
Terms & Conditions | Privacy Policy | Supplier Sustainability Policy | Health & Safety Policy | Environmental Policy & CSR Report + +
Customer Care: +91-9999333223
\ No newline at end of file diff --git a/docs/v1.0.2/Map-View.md b/docs/v1.0.2/Map-View.md new file mode 100644 index 0000000..7a7c210 --- /dev/null +++ b/docs/v1.0.2/Map-View.md @@ -0,0 +1,207 @@ +[

](https://www.mapmyindia.com/api) + +# MapView +## MapplsGL.MapView + +### props +| Prop | Type | Default | Required | Description | +| ---- | :--: | :-----: | :------: | :----------: | +| contentInset | `union` | `none` | `false` | The distance from the edges of the map view’s frame to the edges of the map view’s logical viewport. | +| preferredFramesPerSecond | `number` | `none` | `false` | iOS: The preferred frame rate at which the map view is rendered.
The default value for this property is MGLMapViewPreferredFramesPerSecondDefault,
which will adaptively set the preferred frame rate based on the capability of
the user’s device to maintain a smooth experience. This property can be set to arbitrary integer values.

Android: The maximum frame rate at which the map view is rendered, but it can't excess the ability of device hardware.
This property can be set to arbitrary integer values. | +| zoomEnabled | `bool` | `none` | `false` | Enable/Disable zoom on the map | +| scrollEnabled | `bool` | `true` | `false` | Enable/Disable scroll on the map | +| pitchEnabled | `bool` | `true` | `false` | Enable/Disable pitch on map | +| rotateEnabled | `bool` | `true` | `false` | Enable/Disable rotation on map | +| compassEnabled | `bool` | `none` | `false` | Enable/Disable the compass from appearing on the map | +| compassViewPosition | `string` | `none` | `false` | Position the compass on a corner of the map | +| compassViewMargins | `object` | `none` | `false` | Add margins to the compass with x and y values | +| surfaceView | `bool` | `false` | `false` | [Android only] Enable/Disable use of GLSurfaceView insted of TextureView. | +| mapplsStyle | `string` | `none` | `false` | Set Mappls Style. | +| onPress | `func` | `none` | `false` | Map press listener, gets called when a user presses the map | +| onLongPress | `func` | `none` | `false` | Map long press listener, gets called when a user long presses the map | +| onRegionWillChange | `func` | `none` | `false` | This event is triggered whenever the currently displayed map region is about to change. | +| onRegionIsChanging | `func` | `none` | `false` | This event is triggered whenever the currently displayed map region is changing. | +| onRegionDidChange | `func` | `none` | `false` | This event is triggered whenever the currently displayed map region finished changing | +| onWillStartLoadingMap | `func` | `none` | `false` | This event is triggered when the map is about to start loading a new map style. | +| onDidFinishLoadingMap | `func` | `none` | `false` | This is triggered when the map has successfully loaded a new map style. | +| onDidFailLoadingMap | `func` | `none` | `false` | This event is triggered when the map has failed to load a new map style. | +| onWillStartRenderingFrame | `func` | `none` | `false` | This event is triggered when the map will start rendering a frame. | +| onDidFinishRenderingFrame | `func` | `none` | `false` | This event is triggered when the map finished rendering a frame. | +| onDidFinishRenderingFrameFully | `func` | `none` | `false` | This event is triggered when the map fully finished rendering a frame. | +| onWillStartRenderingMap | `func` | `none` | `false` | This event is triggered when the map will start rendering the map. | +| onDidFinishRenderingMap | `func` | `none` | `false` | This event is triggered when the map finished rendering the map. | +| onDidFinishRenderingMapFully | `func` | `none` | `false` | This event is triggered when the map fully finished rendering the map. | +| onUserLocationUpdate | `func` | `none` | `false` | This event is triggered when the user location is updated. | +| onDidFinishLoadingStyle | `func` | `none` | `false` | This event is triggered when a style has finished loading. | +| regionWillChangeDebounceTime | `number` | `10` | `false` | The emitted frequency of regionwillchange events | +| regionDidChangeDebounceTime | `number` | `500` | `false` | The emitted frequency of regiondidchange events | +| didLoadedMapplsMapsStyles | `func` | `none` | `false` | Provide list of Available Mappls Style | +| onMapError| `func` | `none` | `false` | This event is triggered when some error occurred during map loading.[For Details](https://github.com/mappls-api/mappls-android-sdk/blob/main/docs/v1.0.1/SDK-Error-code.md) | +| onPlaceClick | `func` | `none` | `false` | Provide Mappls pin on click of label | + + +### methods +#### getPointInView(coordinate) + +Converts a geographic coordinate to a point in the given view’s coordinate system. + +##### arguments +| Name | Type | Required | Description | +| ---- | :--: | :------: | :----------: | +| `coordinate` | `Array` | `Yes` | A point expressed in the map view's coordinate system. | + +```javascript +const pointInView = await this._map.getPointInView([-37.817070, 144.949901]); +``` + + +#### getCoordinateFromView(point) + +Converts a point in the given view’s coordinate system to a geographic coordinate. + +##### arguments +| Name | Type | Required | Description | +| ---- | :--: | :------: | :----------: | +| `point` | `Array` | `Yes` | A point expressed in the given view’s coordinate system. | + +```javascript +const coordinate = await this._map.getCoordinateFromView([100, 100]); +``` + + +#### getVisibleBounds() + +The coordinate bounds(ne, sw) visible in the users’s viewport. + +##### arguments +| Name | Type | Required | Description | +| ---- | :--: | :------: | :----------: | + +```javascript +const visibleBounds = await this._map.getVisibleBounds(); +``` + + +#### queryRenderedFeaturesAtPoint(coordinate[, filter][, layerIDs]) + +Returns an array of rendered map features that intersect with a given point. + +##### arguments +| Name | Type | Required | Description | +| ---- | :--: | :------: | :----------: | +| `coordinate` | `Array` | `Yes` | A point expressed in the map view’s coordinate system. | +| `filter` | `Array` | `No` | A set of strings that correspond to the names of layers defined in the current style. Only the features contained in these layers are included in the returned array. | +| `layerIDs` | `Array` | `No` | A array of layer id's to filter the features by | + +```javascript +this._map.queryRenderedFeaturesAtPoint([30, 40], ['==', 'type', 'Point'], ['id1', 'id2']) +``` + + +#### queryRenderedFeaturesInRect(bbox[, filter][, layerIDs]) + +Returns an array of rendered map features that intersect with the given rectangle,
restricted to the given style layers and filtered by the given predicate. + +##### arguments +| Name | Type | Required | Description | +| ---- | :--: | :------: | :----------: | +| `bbox` | `Array` | `Yes` | A rectangle expressed in the map view’s coordinate system. | +| `filter` | `Array` | `No` | A set of strings that correspond to the names of layers defined in the current style. Only the features contained in these layers are included in the returned array. | +| `layerIDs` | `Array` | `No` | A array of layer id's to filter the features by | + +```javascript +this._map.queryRenderedFeaturesInRect([30, 40, 20, 10], ['==', 'type', 'Point'], ['id1', 'id2']) +``` + + +#### setCamera() + +Map camera will perform updates based on provided config. Deprecated use Camera#setCamera. + +##### arguments +| Name | Type | Required | Description | +| ---- | :--: | :------: | :----------: | + + + +#### takeSnap(writeToDisk) + +Takes snapshot of map with current tiles and returns a URI to the image + +##### arguments +| Name | Type | Required | Description | +| ---- | :--: | :------: | :----------: | +| `writeToDisk` | `Boolean` | `Yes` | If true will create a temp file, otherwise it is in base64 | + + +#### getZoom() + +Returns the current zoom of the map view. + +##### arguments +| Name | Type | Required | Description | +| ---- | :--: | :------: | :----------: | + +```javascript +const zoom = await this._map.getZoom(); +``` + + +#### getCenter() + +Returns the map's geographical centerpoint + +##### arguments +| Name | Type | Required | Description | +| ---- | :--: | :------: | :----------: | + +```javascript +const center = await this._map.getCenter(); +``` + + +#### setSourceVisibility(visible, sourceId[, sourceLayerId]) + +Sets the visibility of all the layers referencing the specified `sourceLayerId` and/or `sourceId` + +##### arguments +| Name | Type | Required | Description | +| ---- | :--: | :------: | :----------: | +| `visible` | `boolean` | `Yes` | Visibility of the layers | +| `sourceId` | `String` | `Yes` | Identifier of the target source (e.g. 'composite') | +| `sourceLayerId` | `String` | `No` | Identifier of the target source-layer (e.g. 'building') | + +```javascript +await this._map.setSourceVisibility(false, 'composite', 'building') +``` + +


+ +For any queries and support, please contact: + +[

](https://about.mappls.com/api/) +Email us at [apisupport@mappls.com](mailto:apisupport@mappls.com) + + +![](https://www.mapmyindia.com/api/img/icons/support.png) +[Support](https://about.mappls.com/contact/) +Need support? contact us! + +

+

+ +[

](https://stackoverflow.com/questions/tagged/mappls-api)[![](https://www.mapmyindia.com/api/img/icons/blog.png)](https://about.mappls.com/blog/)[![](https://www.mapmyindia.com/api/img/icons/gethub.png)](https://github.com/Mappls-api)[

](https://www.npmjs.com/org/mapmyindia) + + + +[

](https://www.facebook.com/Mapplsofficial)[![](https://www.mapmyindia.com/june-newsletter/icon2.png)](https://twitter.com/mappls)[![](https://www.mapmyindia.com/newsletter/2017/aug/llinkedin.png)](https://www.linkedin.com/company/mappls/)[![](https://www.mapmyindia.com/june-newsletter/icon3.png)](https://www.youtube.com/channel/UCAWvWsh-dZLLeUU7_J9HiOA) + + + + +

@ Copyright 2022 CE Info Systems Ltd. All Rights Reserved.
+ +
Terms & Conditions | Privacy Policy | Supplier Sustainability Policy | Health & Safety Policy | Environmental Policy & CSR Report + +
Customer Care: +91-9999333223
+ diff --git a/docs/v1.0.2/Nearby-Report.md b/docs/v1.0.2/Nearby-Report.md new file mode 100644 index 0000000..b972055 --- /dev/null +++ b/docs/v1.0.2/Nearby-Report.md @@ -0,0 +1,83 @@ + +[

](https://www.mapmyindia.com/api) +# Nearby Reports +Mappls Reports APIs enable the user to report any incidents at any place with predefined categories and +get that information on the Map and during Navigation. + +Our SDK allows you the developers to get smooth way to access these reports. + + +```javascript +try { + const nearbyReportsResponse = await MapplsGL.RestApi.nearbyReports(params); + console.log(JSON.stringify(data)); + } catch (e) { + //error log + } +``` + +### Request Parameters +#### Mandatory Parameter +1. ``topLeft(Point)``: Point with top left latitude longitude +2. ``bottomRight(Point)``:Point with bottom right latitude longitude + +### Response Code (as HTTP response code) +#### Success: +1. 200: To denote a successful API call. +2. 204: To denote the API was a success but no results were found. +#### Client side issues: +1. 400: Bad Request, User made an error while creating a valid request. +2. 401: Unauthorized, Developer’s key is not allowed to send a request with restricted parameters. +3. 403: Forbidden, Developer’s key has hit its daily/hourly limit. +#### Server-Side Issues: +1. 500: Internal Server Error, the request caused an error in our systems. +2. 503: Service Unavailable, during our maintenance break or server downtimes. + +### Response Messages (as HTTP response message) +1. 200: Success. +2. 204: No matches were found for the provided query. +3. 400: Something’s just not right with the request. +4. 401: Access Denied. +5. 403: Services for this key has been suspended due to daily/hourly transactions limit. +6. 500: Something went wrong. +7. 503: Maintenance Break. +### + +### Response Parameter +#### NearbyReport Response Result Parameters +1. ``id`` (String): id of the report +2. ``createdOn`` (Long): Timestamp when event created +3. ``latitude`` (Double): latitude of the report. +4. ``longitude`` (Double): longitude of the report. +5. ``category`` (String): report category. + + +


+ +For any queries and support, please contact: + +[

](https://about.mappls.com/api/) +Email us at [apisupport@mappls.com](mailto:apisupport@mappls.com) + + +![](https://www.mapmyindia.com/api/img/icons/support.png) +[Support](https://about.mappls.com/contact/) +Need support? contact us! + +

+

+ +[

](https://stackoverflow.com/questions/tagged/mappls-api)[![](https://www.mapmyindia.com/api/img/icons/blog.png)](https://about.mappls.com/blog/)[![](https://www.mapmyindia.com/api/img/icons/gethub.png)](https://github.com/Mappls-api)[

](https://www.npmjs.com/org/mapmyindia) + + + +[

](https://www.facebook.com/Mapplsofficial)[![](https://www.mapmyindia.com/june-newsletter/icon2.png)](https://twitter.com/mappls)[![](https://www.mapmyindia.com/newsletter/2017/aug/llinkedin.png)](https://www.linkedin.com/company/mappls/)[![](https://www.mapmyindia.com/june-newsletter/icon3.png)](https://www.youtube.com/channel/UCAWvWsh-dZLLeUU7_J9HiOA) + + + + +

@ Copyright 2023 CE Info Systems Ltd. All Rights Reserved.
+ +
Terms & Conditions | Privacy Policy | Supplier Sustainability Policy | Health & Safety Policy | Environmental Policy & CSR Report + +
Customer Care: +91-9999333223
diff --git a/docs/v1.0.2/Nearby-Widget-Advance.md b/docs/v1.0.2/Nearby-Widget-Advance.md new file mode 100644 index 0000000..58c0bfe --- /dev/null +++ b/docs/v1.0.2/Nearby-Widget-Advance.md @@ -0,0 +1,126 @@ + +[

](https://www.mapmyindia.com/api) + + +# Mappls Nearby Search Widget - Advanced Details + +Mappls Nearby Search Widget is highly configurable widget, it provides options to customized almost everything. + +For installation / basic information [click here](./Nearby-Widget.md) + +## [Advanced Configurations](#Advanced-Configurations) + +To set advanced configurations in Nearby Search widget. +### Using MapplsNearbyFragment +~~~javaScript +try { + const data = await MapplsNearbyWidget.openNearbyWidget(parms); + console.log(data) +} catch( e ){ + console.log(e) +} +~~~ + +### [CategoryCode](#CategoryCode) + +This class is used to set the information for the nearby categories to show in Nearby Widget. +It contains the following properties in constructor: +1. `category (String)`: Name of the category that display on a view +2. `icon(Integer)`: To show icon of category +3. `categoryCode (List)`: List of category codes +4. `markerIcon (Integer)`: Marker icon to display on a map +5. `isSelected (Boolean)`: To set the category is selected or not + +### [NearbyUIOption](#NearbyUIOption) +This class is used to set the UI configurations of the Nearby Widget +It contains the following properties: +1. `toolbarColor(Integer)`: To set the toolbar color of nearby result screen +2. `backgroundColor(Integer)`: To set the background color of nearby category selection screen +3. `nearbyToolbarIcon(Integer)`: To set the toolbar icon on category selection screen +4. `toolbarTintColor(Integer)`: To set text and icon color of toolbar of nearby selection screen +5. `nearbyToolbarColor(Integer)`: To set the toolbar color of nearby category selection screen +6. `nearbyToolbarTintColor(Integer)`: To set the toolbar text color of nearby category selection screen +7. `locationDetailsBackgroundColor(Integer)`: To set background color of location detail view +8. `locationDetailsInfoLabelText(String)`: To set location detail information text +9. `locationDetailInfoTextColor(Integer)`: To set location detail information text color +10. `locationDetailFormattedAddressTextColor(Integer)`: To set selected location Address text color +11. `changeLocationButtonTextColor(Integer)`: To set change location button Text color +12. `useCurrentLocationButtonTextColor(Integer)`: To set use current location Button text color +13. `selectedCategoryBackgroundColor(Integer)`: To set selected category item background color +14. `selectedCategoryTextColor(Integer)`: To set selected category item text color +15. `selectedCategoryTintColor(Integer)`: To set selected category item icon color +16. `categoryBackgroundColor(Integer)`: To set category item background color +17. `categoryTextColor(Integer)`: To set Category item text color +18. `categoryTintColor(Integer)`: To set Category item icon color +19. `submitButtonColor(Integer)`: To set background color of submit button +20. `submitButtonTextColor(Integer)`: To set submit button text color +21. `submitButtonText(String)`: To set submit button text +22. `paginationBackgroundColor(Integer)`: To set background color of page selection view +23. `tabTextColor(Integer)`: To set tab text color +24. `tabBackgroundColor(Integer)`: To set tab background color +25. `selectedTabTextColor(Integer)`: To set selected tab text color +26. `tabIndicatorColor(Integer)`: To set selected tab indicator color +27. `tabIconTint(Integer)`: To set tab icon color (can use selector color) +28. `placeNameTextColor(Integer)`: To set result item place name text color +29. `distanceTextColor(Integer)`: To set result item distance text color +30. `placeAddressTextColor(Integer)`: To set result item address text color +31. `refLocationIcon(Integer)`: To set reference location marker icon +32. `refLocationCircleColor(Integer)`: To set circle color around reference location +33. `refLocationCircleAlpha(Float)`: To set circle alpha for reference location +34. `showDefaultMap(Boolean)`: To add Default map or not + +### [NearbyOption](#NearbyOption) +This class is used to set the properties related to nearby search +It contains the following properties: +1. `radius(Integer)`: provides the range of distance to search over(default: 1000, min: 500, max: 10000) +2. `sortBy(String)`: provides configured sorting operations for the client on cloud.**Below are the available sorts:** + - **NearbyCriteria.DISTANCE_ASCENDING** + - **NearbyCriteria.DISTANCE_DESCENDING** will sort the data on distance basis. + - **NearbyCriteria.NAME_ASCENDING** + - **NearbyCriteria.NAME_DESCENDING** will sort the data on alphabetically basis. +3. `searchBy(String)`: provides configurable search operations for the client on cloud. **Below are the available sorts:​** + - **NearbyCriteria.DISTANCE** + - **NearbyCriteria.IMPORTANCE** - will search data in order of prominence of the place. +4. `bounds(String)`: Allows the developer to send in map bounds to provide a nearby search within the bounds. + {e.g. (bounds("28.56812,77.240519;28.532790,77.290854")) +5. `pod(String)`: it takes in the place type code which helps in restricting the results to certain chosen type. Access to this parameter is controlled from the backend. This parameter if provided will override any values provided in `keywords` request param. + **Below mentioned are the codes for the pod** + - NearbyCriteria.POD_SUB_LOCALITY + - NearbyCriteria.POD_LOCALITY + - NearbyCriteria.POD_CITY + - NearbyCriteria.POD_STATE +6. `filter(String)`: This parameter helps you get a specific type of EV charging Station + - `filter` = model:(string);brandId:(string);plugType:(string) +7. `richData(Boolean)`: Rich Data related to POI +8. `userName(String)`: Use to set the user name + + +


+ +For any queries and support, please contact: + +[

](https://about.mappls.com/api/) +Email us at [apisupport@mappls.com](mailto:apisupport@mappls.com) + + +![](https://www.mapmyindia.com/api/img/icons/support.png) +[Support](https://about.mappls.com/contact/) +Need support? contact us! + +

+

+ +[

](https://stackoverflow.com/questions/tagged/mappls-api)[![](https://www.mapmyindia.com/api/img/icons/blog.png)](https://about.mappls.com/blog/)[![](https://www.mapmyindia.com/api/img/icons/gethub.png)](https://github.com/Mappls-api)[

](https://www.npmjs.com/org/mapmyindia) + + + +[

](https://www.facebook.com/Mapplsofficial)[![](https://www.mapmyindia.com/june-newsletter/icon2.png)](https://twitter.com/mappls)[![](https://www.mapmyindia.com/newsletter/2017/aug/llinkedin.png)](https://www.linkedin.com/company/mappls/)[![](https://www.mapmyindia.com/june-newsletter/icon3.png)](https://www.youtube.com/channel/UCAWvWsh-dZLLeUU7_J9HiOA) + + + + +

@ Copyright 2023 CE Info Systems Ltd. All Rights Reserved.
+ +
Terms & Conditions | Privacy Policy | Supplier Sustainability Policy | Health & Safety Policy | Environmental Policy & CSR Report + +
Customer Care: +91-9999333223
diff --git a/docs/v1.0.2/Nearby-Widget.md b/docs/v1.0.2/Nearby-Widget.md new file mode 100644 index 0000000..6e94303 --- /dev/null +++ b/docs/v1.0.2/Nearby-Widget.md @@ -0,0 +1,172 @@ +[

](https://www.mapmyindia.com/api) + +# Mappls Nearby Widget React Native + +## Getting started + +`npm i mappls-nearby-widget-react-native` + +* Install peerDependencies +~~~javascript +npm i mappls-map-react-native +~~~ + + +* If using React-native<0.60 + +` react-native link mappls-nearby-widget-react-native` + + +### Installation + + +### Android + +* Add followling line in `android/build.gradle` file:- + +```diff +allprojects { + repositories { + mavenLocal() + maven { +// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm + url("$rootDir/../node_modules/react-native/android") + } + maven { + // Android JSC is installed from npm + url("$rootDir/../node_modules/jsc-android/dist") + } + + ++ maven { url 'https://maven.mappls.com/repository/mappls/'} + + google() + jcenter() + maven { url 'https://www.jitpack.io' } + + } + +} +``` + +* Add followling line in `android/app/build.gradle` file:- + + +```diff +defaultConfig { + +applicationId "com.example" + +minSdkVersion rootProject.ext.minSdkVersion + +targetSdkVersion rootProject.ext.targetSdkVersion + +versionCode 1 + +versionName "1.0" + ++ multiDexEnabled true + +} ++ dataBinding { ++ enabled true ++ } +``` + +### ios + +* run **pod install** from ios folder + +## Usage + +#### Step 1: Import +```javascript +import MapplsNearbyWidget from "mappls-nearby-widget-react-native"; +import MapplsGL from 'mappls-map-react-native'; +``` + +#### Step 2. Initialization +Initialize the SDK with your keys. +~~~javascript +// for map sdk +MapplsGL.setMapSDKKey(mapSDKKey);//place your mapsdkKey +MapplsGL.setRestAPIKey(restAPIKey);//your restApiKey +MapplsGL.setAtlasClientId(atlasClientId);//your atlasClientId key +MapplsGL.setAtlasClientSecret(atlasClientSecret); //your atlasClientSecret key +~~~ + +#### Step 3: Open MapplsNearbyWidget + +```javascript +try { + const data = await MapplsNearbyWidget.openNearbyWidget({}); + console.log(JSON.stringify(data)); + } catch (e) { + //error log + } +``` +#### Request Props +* **nearbyOptions**(Object): You can use `nearbyOptions` to set the following properties: + +1. `radius(number)`: provides the range of distance to search over(default: 1000, min: 500, max: 10000) +2. `sortBy(Enum)`: provides configured sorting operations for the client on cloud.**Below are the available sorts:** + +- **NearbyCriteria.DISTANCE_ASCENDING** +- **NearbyCriteria.DISTANCE_DESCENDING** will sort the data on distance basis. +- **NearbyCriteria.NAME_ASCENDING** +- **NearbyCriteria.NAME_DESCENDING** will sort the data on alphabetically basis. + +3. `searchBy(Enum)`: provides configurable search operations for the client on cloud. **Below are the available sorts:​** + +- **NearbyCriteria.DISTANCE** +- **NearbyCriteria.IMPORTANCE** - will search data in order of prominence of the place. + +4. `bounds(String)`: Allows the developer to send in map bounds to provide a nearby search within the bounds. + {e.g. (bounds(“28.56812,77.240519;28.532790,77.290854”)) +5. `pod(Enum)`: it takes in the place type code which helps in restricting the results to certain chosen type. Access to this parameter is controlled from the backend. This parameter if provided will override any values provided in `keywords` request param. + **Below mentioned are the codes for the pod** + + - NearbyCriteria.POD_SUB_LOCALITY + - NearbyCriteria.POD_LOCALITY + - NearbyCriteria.POD_CITY + - NearbyCriteria.POD_STATE + +6. `filter(String)`: This parameter helps you get a specific type of EV charging Station + - `filter` = model:(string);brandId:(string);plugType:(string) +7. `richData(Boolean)`: Rich Data related to POI +8. `userName(String)`: Use to set the user name + * **categoryCodes**(Array[Object]): You can set array of `categoryCodes` with following parameters: + 1. `category (String)`: Name of the category that display on a view +2. `icon(image)`: To show icon of category, example:- icon:Image.resolveAssetSource(require('./coffee.png')) +3. `categoryCode (Array)`: List of category codes +4. `markerIcon (image)`: Marker icon to display on a map , example:- icon:Image.resolveAssetSource(require('./marker.png')) + +


+ +For any queries and support, please contact: + +[

](https://about.mappls.com/api/) +Email us at [apisupport@mappls.com](mailto:apisupport@mappls.com) + + +![](https://www.mapmyindia.com/api/img/icons/support.png) +[Support](https://about.mappls.com/contact/) +Need support? contact us! + +

+

+ +[

](https://stackoverflow.com/questions/tagged/mappls-api)[![](https://www.mapmyindia.com/api/img/icons/blog.png)](https://about.mappls.com/blog/)[![](https://www.mapmyindia.com/api/img/icons/gethub.png)](https://github.com/Mappls-api)[

](https://www.npmjs.com/org/mapmyindia) + + + +[

](https://www.facebook.com/Mapplsofficial)[![](https://www.mapmyindia.com/june-newsletter/icon2.png)](https://twitter.com/mappls)[![](https://www.mapmyindia.com/newsletter/2017/aug/llinkedin.png)](https://www.linkedin.com/company/mappls/)[![](https://www.mapmyindia.com/june-newsletter/icon3.png)](https://www.youtube.com/channel/UCAWvWsh-dZLLeUU7_J9HiOA) + + + + +

@ Copyright 2022 CE Info Systems Ltd. All Rights Reserved.
+ +
Terms & Conditions | Privacy Policy | Supplier Sustainability Policy | Health & Safety Policy | Environmental Policy & CSR Report + +
Customer Care: +91-9999333223
diff --git a/docs/v1.0.2/Place-Autocomplete.md b/docs/v1.0.2/Place-Autocomplete.md new file mode 100644 index 0000000..cc44dca --- /dev/null +++ b/docs/v1.0.2/Place-Autocomplete.md @@ -0,0 +1,185 @@ +[

](https://www.mapmyindia.com/api) + +# Mappls Search Widget +## [Getting started](#getting-started) +`npm install mappls-search-widgets-react-native --save` + +* Install peerDependencies +~~~javascript +npm i mappls-map-react-native react-native-simple-toast @react-native-community/netinfo +~~~ + + +* If using React-native<0.60 + +` react-native link mappls-search-widgets-react-native` + + +## Installation + + +### Android + +* Add followling line in `android/build.gradle` file:- + +```diff +allprojects { + repositories { + mavenLocal() + maven { +// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm + url("$rootDir/../node_modules/react-native/android") + } + maven { + // Android JSC is installed from npm + url("$rootDir/../node_modules/jsc-android/dist") + } + ++ maven { url 'https://maven.mappls.com/repository/mappls/'} + + google() + jcenter() + maven { url 'https://www.jitpack.io' } + + } + +} +``` + +* Add followling line in `android/app/build.gradle` file:- + + +```diff +defaultConfig { + +applicationId "com.example" + +minSdkVersion rootProject.ext.minSdkVersion + +targetSdkVersion rootProject.ext.targetSdkVersion + +versionCode 1 + +versionName "1.0" + ++ multiDexEnabled true + +} +``` + +### ios + +* run **pod install** from ios folder + +## Usage + +#### Step 1: Import +```javascript +import MapplsUIWidgets from 'mappls-search-widgets-react-native' +import MapplsGL from 'mappls-map-react-native-beta'; +``` + +#### Step 2. Initialization +Initialize the SDK with your keys. +```javascript +// for map sdk +MapplsGL.setMapSDKKey(mapSDKKey);//place your mapsdkKey +MapplsGL.setRestAPIKey(restAPIKey);//your restApiKey +MapplsGL.setAtlasClientId(atlasClientId);//your atlasClientId key +MapplsGL.setAtlasClientSecret(atlasClientSecret); //your atlasClientSecret key +``` + +### [PlacePicker](#placepicker) + +```javascript + + //Do something with result + } + /> +``` +#### Request Props +1. **center** :(number) place picker center coordinate(optional) +***note***- if center is not provided map will zoom to current location of user. + +2. **zoom**:(number) place picker map zoom level (optional) +3. **pickerImage** :place picker marker image. You can use static images or image urls.(optional) +4. [ **searchWidgetProps** ](#Search-Widget-Request-Properties):(object) custom configuration for search widget props inside place picker.(optional) +5. **resultCallback**:(function) returns result of place picker + +### [Search Widget](#search-widget) +```javascript +try{ + const res = await MapplsUIWidgets.searchWidget({toolbarColor:'#F5F5F5'}); + //Do something with result + }catch(e){ + //error logs + console.log(e); + } +``` + +#### Search Widget Request Properties +1. `location(Array)`: set location around which your search will appear. Ex. `[77.56,28.34]` +2. `filter(String)`: this parameter helps you restrict the result either by mentioning a bounded area or to certain eloc (6 digit code to any poi, locality, city, etc.), below mentioned are the both types: + + - `filter` = bounds: lat1, lng1; lat2, lng2 (latitude, longitude) {e.g. filter("bounds: 28.598882, 77.212407; 28.467375, 77.353513") + - `filter` = cop: {mapplsPin} (string) {e.g. filter("cop:YMCZ0J") + +3. `historyCount(number)`: Maximum number of history results appear. **(Android )** + +4. `zoom(number)`: takes the zoom level of the current scope of the map (min: 4, max: 18). + +5. `saveHistory(Boolean)`: If it sets to `true` it shows the history selected data. **(Android )** +6. `pod(String)`: 1. it takes in the place type code which helps in restricting the results to certain chosen type.**Below mentioned are the codes for the pod** + + - MapplsUIWidgets.POD_SUB_LOCALITY + - MapplsUIWidgets.POD_LOCALITY + - MapplsUIWidgets.POD_CITY + - MapplsUIWidgets.POD_VILLAGE + - MapplsUIWidgets.POD_SUB_DISTRICT + - MapplsUIWidgets.POD_DISTRICT + - MapplsUIWidgets.POD_STATE + - MapplsUIWidgets.POD_SUB_SUB_LOCALITY +7. `tokenizeAddress(Boolean)`: provides the different address attributes in a structured object. + +8. `backgroundColor(HexColor)`: to set the background color of the widget + +9. `toolbarColor(HexColor)`: to set the toolbar color of the widget. + +10. `hint(String)`: To set the hint on the Search view of the widget. + +11. `hyperLocal(Boolean)`: This parameter lets the search give results that are hyper-localized to the reference location passed in the location parameter. This means that nearby results are given a higher ranking than results far from the reference location. Highly prominent results will still appear in the search results, however they will be lower in the list of results. This parameter will work ONLY in conjunction with the location parameter. + +


+ +For any queries and support, please contact: + +[

](https://about.mappls.com/api/) +Email us at [apisupport@mappls.com](mailto:apisupport@mappls.com) + + +![](https://www.mapmyindia.com/api/img/icons/support.png) +[Support](https://about.mappls.com/contact/) +Need support? contact us! + +

+

+ +[

](https://stackoverflow.com/questions/tagged/mappls-api)[![](https://www.mapmyindia.com/api/img/icons/blog.png)](https://about.mappls.com/blog/)[![](https://www.mapmyindia.com/api/img/icons/gethub.png)](https://github.com/Mappls-api)[

](https://www.npmjs.com/org/mapmyindia) + + + +[

](https://www.facebook.com/Mapplsofficial)[![](https://www.mapmyindia.com/june-newsletter/icon2.png)](https://twitter.com/mappls)[![](https://www.mapmyindia.com/newsletter/2017/aug/llinkedin.png)](https://www.linkedin.com/company/mappls/)[![](https://www.mapmyindia.com/june-newsletter/icon3.png)](https://www.youtube.com/channel/UCAWvWsh-dZLLeUU7_J9HiOA) + + + + +

@ Copyright 2022 CE Info Systems Ltd. All Rights Reserved.
+ +
Terms & Conditions | Privacy Policy | Supplier Sustainability Policy | Health & Safety Policy | Environmental Policy & CSR Report + +
Customer Care: +91-9999333223
diff --git a/docs/v1.0.2/Point-Annotation.md b/docs/v1.0.2/Point-Annotation.md new file mode 100644 index 0000000..fd58447 --- /dev/null +++ b/docs/v1.0.2/Point-Annotation.md @@ -0,0 +1,54 @@ +[

](https://www.mapmyindia.com/api) +# PointAnnotation +## MapplsGL.PointAnnotation + +PointAnnotation represents a one-dimensional shape located at a single geographical coordinate. + +### props +| Prop | Type | Default | Required | Description | +| ---- | :--: | :-----: | :------: | :----------: | +| id | `string` | `none` | `true` | A string that uniquely identifies the annotation | +| title | `string` | `none` | `false` | The string containing the annotation’s title. Note this is required to be set if you want to see a callout appear on iOS. | +| snippet | `string` | `none` | `false` | The string containing the annotation’s snippet(subtitle). Not displayed in the default callout. | +| selected | `bool` | `none` | `false` | Manually selects/deselects annotation
@type {[type]} | +| draggable | `bool` | `false` | `false` | Enable or disable dragging. Defaults to false. | +| mapplsPin| `string` | `none` | `false` | The center point (specified as a mapplsPin string) of the annotation. | +| coordinate | `array` | `none` | `true` | The center point (specified as a map coordinate) of the annotation. | +| anchor | `shape` | `{x: 0.5, y: 0.5}` | `false` | Specifies the anchor being set on a particular point of the annotation.
The anchor point is specified in the continuous space [0.0, 1.0] x [0.0, 1.0],
where (0, 0) is the top-left corner of the image, and (1, 1) is the bottom-right corner.
Note this is only for custom annotations not the default pin view.
Defaults to the center of the view. | +| onSelected | `func` | `none` | `false` | This callback is fired once this annotation is selected. Returns a Feature as the first param. | +| onDeselected | `func` | `none` | `false` | This callback is fired once this annotation is deselected. | +| onDragStart | `func` | `none` | `false` | This callback is fired once this annotation has started being dragged. | +| onDragEnd | `func` | `none` | `false` | This callback is fired once this annotation has stopped being dragged. | + + +


+ +For any queries and support, please contact: + +[

](https://about.mappls.com/api/) +Email us at [apisupport@mappls.com](mailto:apisupport@mappls.com) + + +![](https://www.mapmyindia.com/api/img/icons/support.png) +[Support](https://about.mappls.com/contact/) +Need support? contact us! + +

+

+ +[

](https://stackoverflow.com/questions/tagged/mappls-api)[![](https://www.mapmyindia.com/api/img/icons/blog.png)](https://about.mappls.com/blog/)[![](https://www.mapmyindia.com/api/img/icons/gethub.png)](https://github.com/Mappls-api)[

](https://www.npmjs.com/org/mapmyindia) + + + +[

](https://www.facebook.com/Mapplsofficial)[![](https://www.mapmyindia.com/june-newsletter/icon2.png)](https://twitter.com/mappls)[![](https://www.mapmyindia.com/newsletter/2017/aug/llinkedin.png)](https://www.linkedin.com/company/mappls/)[![](https://www.mapmyindia.com/june-newsletter/icon3.png)](https://www.youtube.com/channel/UCAWvWsh-dZLLeUU7_J9HiOA) + + + + +

@ Copyright 2022 CE Info Systems Ltd. All Rights Reserved.
+ +
Terms & Conditions | Privacy Policy | Supplier Sustainability Policy | Health & Safety Policy | Environmental Policy & CSR Report + +
Customer Care: +91-9999333223
+ + diff --git a/docs/v1.0.2/README.md b/docs/v1.0.2/README.md new file mode 100644 index 0000000..da0dfa0 --- /dev/null +++ b/docs/v1.0.2/README.md @@ -0,0 +1,108 @@ +[

](https://www.mapmyindia.com/api) + +# Mappls React Native SDK + +**Easy To Integrate Maps & Location APIs & SDKs For Android Applications** + +Powered with India's most comprehensive and robust mapping functionalities. + +1. You can get your api key to be used in this document here: [https://about.mappls.com/api/signup](https://about.mappls.com/api/signup) + +2. The sample code is provided to help you understand the basic functionality of Mappls maps & REST APIs working on **React Native** native development platform. + +4. Explore through [200+ countries & territories](https://github.com/MapmyIndia/mapmyindia-rest-api/blob/master/docs/countryISO.md) with **Global Search, Routing and Mapping APIs & SDKs** by Mappls. + +## [Documentation History](#Documentation-History) + +| Version | Supported SDK Version | +| ---- | ---- | +| [v1.0.2](../v1.0.2/README.md) | - Map SDK v1.0.7
- Place Search Widget v1.1.0
- GeoFence Widget v1.0.0
- Direction Widget v1.1.0
- Nearby UI Widget v1.0.0
- Mappls Polyline v1.0.0 | +| [v1.0.1](../v1.0.1/README.md) | - Map SDK v1.0.3
- Place Search Widget v1.0.1
- GeoFence Widget v1.0.0
- Direction Widget v1.0.0
- Nearby UI Widget v1.0.0
- Mappls Polyline v1.0.0 | +| [v1.0.0](../v1.0.0/README.md) | - Map SDK v1.0.0
- Place Search Widget v1.0.0
- GeoFence Widget v1.0.0
- Direction Widget v1.0.0
- Nearby UI Widget v1.0.0
- Mappls Polyline v1.0.0 | + +## [Version History](#Version-History) + +| Version | Last Updated | Author | Release Note| +| ---- | ---- | ---- | ---- | +| v1.0.7 | 05 June 2023 | Mappls API Team ([MA](https://github.com/mdakram)) ([ST](https://github.com/saksham66)) | - Security Improvements
- Bug Fixes & Improvements | +| v1.0.6 | 05 June 2023 | Mappls API Team ([MA](https://github.com/mdakram)) ([ST](https://github.com/saksham66)) | - Added `Cost Estimation` Api
- Bug Fixes | +| v1.0.5 | 02 May 2023 | Mappls API Team ([MA](https://github.com/mdakram)) ([ST](https://github.com/saksham66)) | - Added `responseLang` parameter in Autosuggest
- Added `lang` parameter in reverse geocode
- Bug Fixes | +| v1.0.4 | 12 April 2023 | Mappls API Team ([MA](https://github.com/mdakram)) ([ST](https://github.com/saksham66)) | - Bug Fixes | +| v1.0.3 | 24 November 2022 | Mappls API Team ([MA](https://github.com/mdakram)) ([ST](https://github.com/saksham66)) | - Bug Fixes | + +For more details of previous versions , [click here](../v1.0.2/Version-History.md). + +## [Table Of Content](#Table-Of-Content) +- [Vector Android Map](./Getting-Started.md) + * [Getting Started](./Getting-Started.md#getting-started) + * [Installation](./Getting-Started.md#installation) + * [Add Import](./Getting-Started.md#added-import) + * [Add your API keys to the SDK](./Getting-Started.md#add-your-api-keys-to-the-sdk) + * [Add a Mappls Map to your application](./Getting-Started.md#add-a-mappls-map-to-your-application) +- Component + * [MapView](./Map-View.md) + * [Light](./Light.md) + * [Point Annotation](./Point-Annotation.md) + * [Callout](./Callout.md) + * [Camera](./Camera.md) + * [User Location](./User-Location.md) + * [Images](./Images.md) +- [Mappls Traffic Overlay](./Traffic-Vector-Overlay.md) +- [Set Country Regions](./Set-Regions.md) +- [Set Mappls Map Style](./Set-Style.md) + * [List of Available Styles](./Set-Style.md#list-of-available-styles) + * [Set Mappls Style](./Set-Style.md#set-mappls-style) + * [To enable/disable last selected style](./Set-Style.md#to-enabledisable-last-selected-style) +- Rest API Kit + * [Search API's](./Search-Api.md) + * [Auto Suggest](./Search-Api.md#auto-suggest) + * [Geocode](./Search-Api.md#geocode) + * [Reverse Geocode](./Search-Api.md#reverse-geocode) + * [Nearby Places](./Search-Api.md#nearby-places) + * [Place Detail](./Search-Api.md#place-details) + * [POI Along the Route](./Search-Api.md#poi-along-the-route) + * [Routes & Navigation API](./Routing-Api.md) + * [Routing API](./Routing-Api.md#routing-api) + * [Driving Distance Matrix API](./Routing-Api.md#driving-distance-matrix-api) + * [Weather Api](./Weather-API.md) + * [Nearby Reports](./Nearby-Report.md) +- [Mappls Search Widget](./Place-Autocomplete.md) + * [Getting Started](./Place-Autocomplete.md#getting-started) + * [Place Picker](./Place-Autocomplete.md#placepicker) + * [Search Widget](./Place-Autocomplete.md#search-widget) +- [Mappls Geofence Widget](./Geofence-Widget.md) +- [Mappls Direction Widget](./Direction-Widget.md) +- [Mappls Nearby Widget](./Nearby-Widget.md) +- [SDK Error Codes](./SDK-Error-code.md) +- [Version History](./Version-History.md) +- [Country List](https://github.com/mappls-api/mappls-rest-apis/blob/main/docs/countryISO.md) + +


+ +For any queries and support, please contact: + +[

](https://about.mappls.com/api/) +Email us at [apisupport@mappls.com](mailto:apisupport@mappls.com) + + +![](https://www.mapmyindia.com/api/img/icons/support.png) +[Support](https://about.mappls.com/contact/) +Need support? contact us! + +

+

+ +[

](https://stackoverflow.com/questions/tagged/mappls-api)[![](https://www.mapmyindia.com/api/img/icons/blog.png)](https://about.mappls.com/blog/)[![](https://www.mapmyindia.com/api/img/icons/gethub.png)](https://github.com/Mappls-api)[

](https://www.npmjs.com/org/mapmyindia) + + + +[

](https://www.facebook.com/Mapplsofficial)[![](https://www.mapmyindia.com/june-newsletter/icon2.png)](https://twitter.com/mappls)[![](https://www.mapmyindia.com/newsletter/2017/aug/llinkedin.png)](https://www.linkedin.com/company/mappls/)[![](https://www.mapmyindia.com/june-newsletter/icon3.png)](https://www.youtube.com/channel/UCAWvWsh-dZLLeUU7_J9HiOA) + + + + +

@ Copyright 2022 CE Info Systems Ltd. All Rights Reserved.
+ +
Terms & Conditions | Privacy Policy | Supplier Sustainability Policy | Health & Safety Policy | Environmental Policy & CSR Report + +
Customer Care: +91-9999333223
diff --git a/docs/v1.0.2/Routing-Api.md b/docs/v1.0.2/Routing-Api.md new file mode 100644 index 0000000..bee6723 --- /dev/null +++ b/docs/v1.0.2/Routing-Api.md @@ -0,0 +1,165 @@ +[

](https://www.mapmyindia.com/api) +# Routes & Navigation API + +## [Routing API](#routing-api) +Routing and displaying driving directions on map, including instructions for navigation, distance to destination, traffic etc. are few of the most important parts of developing a map based application. This REST API calculates driving routes between specified locations including via points based on route type(fastest or shortest), includes delays for traffic congestion , and is capable of handling additional route parameters like: type of roads to avoid, travelling vehicle type etc. + +~~~javascript +MapplsGL.RestApi.direction({ + origin: this.state.sourceCoordinates, + destination: this.state.destinationCoordinates, + profile: setProfile, + overview: MapplsGL.RestApi.DirectionsCriteria.OVERVIEW_FULL, +}).then(response => { + // Handle Response +}).catch(error => { + // Handle Error +}); +~~~ + +### Request Parameter +#### Mandatory Parameter +1. `origin(string)`: pass the origin point + - origin can also takes mappls pin in parameter eg., origin("17ZUL7") +2. `destination(string)`: pass the destination point + - destination can also takes mappls pin in parameter eg., destination("MMI000") - + +#### Optional Parameter +1. `waypoints(Array)`: pass list of waypoints +2. `excludes(Array)`: Additive list of road classes to avoid, order does not matter. **Below are the available value:** + - MapplsGL.RestApi.DirectionsCriteria.EXCLUDE_FERRY + - MapplsGL.RestApi.DirectionsCriteria.EXCLUDE_MOTORWAY + - MapplsGL.RestApi.DirectionsCriteria.EXCLUDE_TOLL +3. `overview(string)`: Add overview geometry either full, simplified according to highest zoom level it could be display on, or not at all. Below are the available value: + - MapplsGL.RestApi.DirectionsCriteria.OVERVIEW_FULL + - MapplsGL.RestApi.DirectionsCriteria.OVERVIEW_FALSE + - MapplsGL.RestApi.DirectionsCriteria.OVERVIEW_SIMPLIFIED +4. `steps(boolean)`: Return route steps for each route leg. Possible values are true/false. By default it will be used as false. +5. `alternatives(boolean)`: Search for alternative routes. +6. `geometries(string)`: This parameter used to change the route geometry format/density (influences overview and per step). **Below are the available value:** + - MapplsGL.RestApi.DirectionsCriteria.GEOMETRY_POLYLINE: with 5 digit precision + - MapplsGL.RestApi.DirectionsCriteria.GEOMETRY_POLYLINE6 (Default): with 6 digit precision +7. `profile(string)`: **Below are the available profile:** + - MapplsGL.RestApi.DirectionsCriteria.PROFILE_DRIVING (Default):Meant for car routing + - MapplsGL.RestApi.DirectionsCriteria.PROFILE_WALKING: Meant for pedestrian routing. Routing with this profile is restricted to route_adv only. region & rtype request parameters are not supported in pedestrian routing + - MapplsGL.RestApi.DirectionsCriteria.PROFILE_BIKING:Meant for two-wheeler routing. Routing with this profile is restricted to route_adv only. region & rtype request parameters are not supported in two-wheeler routing. + - MapplsGL.RestApi.DirectionsCriteria.PROFILE_TRUCKING:Meant for Truck routing. Routing with this profile is restricted to route_adv only. region & rtype request parameters are not supported in truck routing. +8. `resource(string)`: **Below are the available resource:** + - MapplsGL.RestApi.DirectionsCriteria.RESOURCE_ROUTE (Default): to calculate a route & its duration without considering traffic conditions. + - MapplsGL.RestApi.DirectionsCriteria.RESOURCE_ROUTE_ETA get the updated duration of a route considering live traffic; Applicable for India only "region=ind" and "rtype=1" is not supported. This is different from route_traffic; since this doesn't search for a route considering traffic, it only applies delays to the default route. + - MapplsGL.RestApi.DirectionsCriteria.RESOURCE_ROUTE_TRAFFIC: to search for routes considering live traffic; Applicable for India only “region=ind” and “rtype=1” is not supported + +### Reponse Parameter +1. `code(string)`: if request is successful, response is .ok.. Else, see the service dependent and general status codes. In case of error, .NoRoute. code is supported (in addition to the general ones) which means no route found. +2. `routes(Array)`: A list of DirectionsRoute objects, each having potentially multiple via points +3. `waypoints(Array)`: Array of DirectionsWaypoint objects representing all waypoints in order + +#### DirectionsRoute Response parameter +1. `distance(number)`: The distance travelled by the route; unit is meter. +2. `duration(number)`: The estimated travel time; unit is second. +3. `geometry(string)`: returns the whole geometry of the route as per given parameter .geometries. default is encoded .polyline6. with 6 digit accuracy for positional coordinates. +4. `legs(Array)`: The legs between the given waypoints, representing an array of RouteLeg between two waypoints. + +#### RouteLeg Response parameter: +1. `distance(number)`: The distance of travel to the subsequent legs, in meters +2. `duration(number)`: The estimated travel time, in seconds +3. `steps(List)`: Return route steps for each route leg depending upon steps parameter. + +#### LegStep Response parameters: +1. `distance(number)`:The distance of travel to the subsequent step, in meters +2. `duration(number)`: The estimated travel time, in seconds +3. `geometry(string)`: The un-simplified geometry of the route segment, depends on the given geometries parameter. +4. `name(string)`: The name of the way along which travel proceeds. +5. `mode(string)`: signifies the mode of transportation; driving as default. +6. `maneuver(StepManeuver)`: A StepManeuver object representing a maneuver +7. `driving_side(string)`: Left. (default) for India, Sri Lanka, Nepal, Bangladesh & Bhutan. +8. `intersections(Array)`: A list of StepIntersection objects that are passed along the segment, the very first belonging to the StepManeuver + +#### StepManeuver Response parameters: +1. `location(Array)`: A Point describing the location of the turn +2. `bearing_before(number)`: The clockwise angle from true north to the direction of travel immediately before the maneuver. +3. `bearing_after(number)`: The clockwise angle from true north to the direction of travel immediately after the maneuver. +4. `type(string)`: An optional string indicating the direction change of the maneuver. +5. `modifier(string)`: A string indicating the type of maneuver. New identifiers might be introduced without API change. Types unknown to the client should be handled like the .turn. type, the existence of correct modifier values is guaranteed. + +#### StepIntersection Response parameters: +1. `location(Array)`: point describing the location of the turn. +2. `bearings(Array)`: A list of bearing values (e.g. [0,90,180,270]) thxat are available at the intersection. The bearings describe all available roads at the intersection. +3. `classes(Array)`: Categorised types of road segments e.g. Motorway +4. `entry(Array)`: A list of entry flags, corresponding in a 1:1 relationship to the bearings. A value of true indicates that the respective road could be entered on a valid route. false indicates that the turn onto the respective road would violate a restriction. +5. `in(number)`: index into bearings/entry array. Used to calculate the bearing just before the turn. Namely, the clockwise angle from true north to the direction of travel immediately before the maneuver/passing the intersection. Bearings are given relative to the intersection. To get the bearing in the direction of driving, the bearing has to be rotated by a value of 180. The value is not supplied for depart maneuvers. +6. `out(number)`: index into the bearings/entry array. Used to extract the bearing just after the turn. Namely, The clockwise angle from true north to the direction of travel immediately after the maneuver/passing the intersection. The value is not supplied for arrive maneuvers. +7. `lanes(Array)`: Array of IntersectionLanes objects that denote the available turn lanes at the intersection. If no lane information is available for an intersection, the lanes property will not be present.): + - `valid(boolean)`: verifying lane info. + - `indications(Array)`: Indicating a sign of directions like Straight, Slight Left, Right, etc. + +#### DirectionsWaypoint Response parameters: +1. `name(string)`: Name of the street the coordinate snapped to. +2. `location(Array)`: Point describing the snapped location of the waypoint. + +## [Driving Distance Matrix API](#driving-distance-matrix-api) +Adding driving directions API would help to add predicted travel time & duration from a given origin point to a number of points. The Driving Distance Matrix API provides driving distance and estimated time to go from a start point to multiple destination points, based on recommended routes from Mappls Maps and traffic flow conditions + +Get driving time and distance between a center point and up to 10 destination points using Mappls Maps Distance API. + +~~~javascript +MapplsGL.RestApi.distance({ + coordinates: [sourceData, destinationData], +}).then(response => { + // Handle Response +}).catch(error => { + // Handle Error +}); +~~~ + +### Request Parameter +#### Mandatory Parameter +1. `coordinates(Array)`: A List full of points which define the points to perform the matrix. + +#### Optional Parameter +1. `profile(string)`: Only supports MapplsGL.RestApi.DirectionsCriteria.PROFILE_DRIVING. +2. `resource(string)`: **Below are the available value:** + - MapplsGL.RestApi.DirectionsCriteria.RESOURCE_DISTANCE (Default): to calculate the route & duration without considering traffic conditions. + - MapplsGL.RestApi.DirectionsCriteria.RESOURCE_DISTANCE_ETA: to get the updated duration considering live traffic; Applicable for India only “region=ind” and “rtype=1” is not supported. This is different from distance_matrix_traffic; since this doesn't search for a route considering traffic, it only applies delays to the default route. + - MapplsGL.RestApi.DirectionsCriteria.RESOURCE_DISTANCE_TRAFFIC: to search for routes considering live traffic; Applicable for India only “region=ind” and “rtype=1” is not supported + +### Response Parameters +1. `responseCode(number)`: Response codes of the api. +2. `version(string)`: Version of the Api. +3. `results(DistanceResults)`: Array of results, each consisting of the following parameters + +#### DistanceResults Response Result Parameters +1. `code(string)`: if the request was successful, code is ok. +2. `durations(Array>)`: Duration in seconds for source to source (default 0), 1st, 2nd, 3rd secondary locations... from source. +3. `distances(Array>)`: Distance in meters for source to source (default 0), 1st, 2nd, 3rd secondary locations... from source. + + +


+ +For any queries and support, please contact: + +[

](https://about.mappls.com/api/) +Email us at [apisupport@mappls.com](mailto:apisupport@mappls.com) + + +![](https://www.mapmyindia.com/api/img/icons/support.png) +[Support](https://about.mappls.com/contact/) +Need support? contact us! + +

+

+ +[

](https://stackoverflow.com/questions/tagged/mappls-api)[![](https://www.mapmyindia.com/api/img/icons/blog.png)](https://about.mappls.com/blog/)[![](https://www.mapmyindia.com/api/img/icons/gethub.png)](https://github.com/Mappls-api)[

](https://www.npmjs.com/org/mapmyindia) + + + +[

](https://www.facebook.com/Mapplsofficial)[![](https://www.mapmyindia.com/june-newsletter/icon2.png)](https://twitter.com/mappls)[![](https://www.mapmyindia.com/newsletter/2017/aug/llinkedin.png)](https://www.linkedin.com/company/mappls/)[![](https://www.mapmyindia.com/june-newsletter/icon3.png)](https://www.youtube.com/channel/UCAWvWsh-dZLLeUU7_J9HiOA) + + + + +

@ Copyright 2022 CE Info Systems Ltd. All Rights Reserved.
+ +
Terms & Conditions | Privacy Policy | Supplier Sustainability Policy | Health & Safety Policy | Environmental Policy & CSR Report + +
Customer Care: +91-9999333223
diff --git a/docs/v1.0.2/SDK-Error-code.md b/docs/v1.0.2/SDK-Error-code.md new file mode 100644 index 0000000..10b56c8 --- /dev/null +++ b/docs/v1.0.2/SDK-Error-code.md @@ -0,0 +1,43 @@ + + +[

](https://www.mapmyindia.com/api) + +# SDK Error Codes +The map function may encounter the following error codes: +* MAPS_SDK_KEY_MISSING (1): This error occurs when the map SDK key is not provided. +* REST_API_KEY_MISSING (2): This error occurs when the REST API key is not provided. +* ATLAS_CLIENT_ID_MISSING (3): This error occurs when the atlas client ID is not provided. +* ATLAS_CLIENT_SECRET_MISSING (4): This error occurs when the atlas client secret is not provided. +* UNKNOWN (5): This error occurs when the map fails to load due to an unknown error. +* AUTHENTICATION_FAILED (6): This error occurs when the map fails to authenticate itself with the Mappls server due to incorrect keys. +* SDK_INITIALISATION_FAILED (7): This error occurs when the SDK initialization fails. + +


+ +For any queries and support, please contact: + +[

](https://about.mappls.com/api/) +Email us at [apisupport@mappls.com](mailto:apisupport@mappls.com) + + +![](https://www.mapmyindia.com/api/img/icons/support.png) +[Support](https://about.mappls.com/contact/) +Need support? contact us! + +

+

+ +[

](https://stackoverflow.com/questions/tagged/mappls-api)[![](https://www.mapmyindia.com/api/img/icons/blog.png)](https://about.mappls.com/blog/)[![](https://www.mapmyindia.com/api/img/icons/gethub.png)](https://github.com/Mappls-api)[

](https://www.npmjs.com/org/mapmyindia) + + + +[

](https://www.facebook.com/Mapplsofficial)[![](https://www.mapmyindia.com/june-newsletter/icon2.png)](https://twitter.com/mappls)[![](https://www.mapmyindia.com/newsletter/2017/aug/llinkedin.png)](https://www.linkedin.com/company/mappls/)[![](https://www.mapmyindia.com/june-newsletter/icon3.png)](https://www.youtube.com/channel/UCAWvWsh-dZLLeUU7_J9HiOA) + + + + +

@ Copyright 2023 CE Info Systems Ltd. All Rights Reserved.
+ +
Terms & Conditions | Privacy Policy | Supplier Sustainability Policy | Health & Safety Policy | Environmental Policy & CSR Report + +
Customer Care: +91-9999333223
\ No newline at end of file diff --git a/docs/v1.0.2/Search-Api.md b/docs/v1.0.2/Search-Api.md new file mode 100644 index 0000000..12e6cf2 --- /dev/null +++ b/docs/v1.0.2/Search-Api.md @@ -0,0 +1,348 @@ +[

](https://www.mapmyindia.com/api) + +# Search API +The following search services are available as part of the SDK bundled by default – + +## [Auto Suggest](#auto-suggest) +The Autosuggest API helps users to complete queries faster by adding intelligent search capabilities to your web or mobile app. This API returns a list of results as well as suggested queries as the user types in the search field. +~~~javascript +MapplsGL.RestApi.autoSuggest({ + query: text, +}).then(response => { + //Handle Response +}).catche(error => { + //Handle Error +}); +~~~ +### Request Parameter +#### Mandatory Parameter +1. `query(String)`: e.g. Shoes, Coffee, Versace, Gucci, H&M, Adidas, Starbucks, B130 {POI, House Number, keyword, tag}. + +#### Optional Parameter +1. `filter(String)`:This parameter helps you restrict the result either by mentioning a bounded area or to certain mapplspin (6 digit code to any poi, locality, city, etc.) below mentioned are the various types: + - filter = bounds: lat1, lng1; lat2, lng2 (latitude, longitude) {e.g. filter: "bounds:28.598882,77.212407;28.467375,77.353513"} + - filter = cop: {mapplspin} (string) {e.g. filter: "cop:YMCZ0J"} +2. `pod(String)`: it takes in the place type code which helps in restricting the results to certain chosen type. **Below mentioned are the codes for the pod** + - MapplsGL.RestApi.AutoSuggestCriteria.POD_SUB_LOCALITY: Sublocality + - MapplsGL.RestApi.AutoSuggestCriteria.POD_LOCALITY: Locality + - MapplsGL.RestApi.AutoSuggestCriteria.POD_CITY: City + - MapplsGL.RestApi.AutoSuggestCriteria.POD_VILLAGE: Village + - MapplsGL.RestApi.AutoSuggestCriteria.POD_SUB_DISTRICT: Subdistrict + - MapplsGL.RestApi.AutoSuggestCriteria.POD_DISTRICT: District + - MapplsGL.RestApi.AutoSuggestCriteria.POD_STATE: State + - MapplsGL.RestApi.AutoSuggestCriteria.POD_SUB_SUB_LOCALITY: Subsublocality +3. `location(Location)`: e.g. location: {latitude: 28.454, longitude: 77.435} +4. `tokenizeAddress(boolean)`: provides the different address attributes in a structured object. +5. `zoom(double)`: takes the zoom level of the current scope of the map (min: 4, max: 18). +6. `hyperLocal(boolean)`: This parameter lets the search give results that are hyper-localized to the reference location passed in the location parameter. This means that nearby results are given a higher ranking than results far from the reference location. Highly prominent results will still appear in the search results, however they will be lower in the list of results. This parameter will work ONLY in conjunction with the location parameter. + +### Response Parameter +1. `suggestedLocations(Array`: A List of the suggested location +2. `userAddedLocations(Array)`: List of usr added locations +3. `suggestedSearches(Array)`: List of suggestion related to your search. + +#### ELocation Response Result Parameter +1. `mapplsPin(String)`: Mappls Pin of the location 6-char alphanumeric. +2. `placeAddress(String)`:Address of the location. +3. `latitude(number)`: Latitude of the location. +4. `longitude(number)`: longitude of the location. +5. `type(String)`: type of location POI or Country or City +6. `placeName(string)`: Name of the location. +7. `addressTokens(AddressTokens)` +8. `orderIndex(number)`: the order where this result should be placed +9. `distance(number)`: aerial distance in meters from reference location + +#### AddressTokens Response Result parameter +1. `houseNumber(string)`: house number of the location. +2. `houseName(string)`: house name of the location. +3. `poi(string)`: name of the POI (if applicable) +4. `street(string)`: name of the street. (if applicable) +5. `subSubLocality(string)`: the sub-sub-locality to which the location belongs. (if applicable) +6. `subLocality(string)`: the sub-locality to which the location belongs. (if applicable) +7. `locality(string)`: the locality to which the location belongs. (if applicable) +8. `village(string)`: the village to which the location belongs. (if applicable) +9. `subDistrict(string)`: the sub-district to which the location belongs. (if applicable) +10. `district(string)`: the district to which the location belongs. (if applicable) +11. `city(string)`: the city to which the location belongs. (if applicable) +12. `state(string)`: the state to which the location belongs. (if applicable) +13. `pincode(string)`: the PIN code to which the location belongs. (if applicable) + +#### SuggestedSearchAtlas Result Response parameter +1. `keyword(string)`: what the user typed in. +2. `identifier(string)`: what did the API use for it to qualify it as a suggested search request +3. `location(string)`: the name of the location to which the nearby will run in context to. +4. `hyperLink(string)`: the ready-made link for the nearby API pre-initialized with all default parameters and location with code to search for. + +## [Geocode](#geocode) +Our Geocoding API converts real addresses into these geographic coordinates (latitude/longitude) to be placed on a map, be it for any street, area, postal code, POI or a house number etc. + +~~~javascript +MapplsGL.RestApi.geocode({address: placeName}) + .then(response => { + //Handle Response + }) + .catch(error => { + //Handle Error + }); +~~~ +### Request Parameter +#### Mandatory Parameters +1. `address(string)`: address to be geocoded e.g. 237 Okhla industrial estate phase 3 new delhi, delhi 110020. + +#### Optional Parameters +1. `itemCount(number)`: parameter can be set to get maximum number of result items from the API (default: 1). + +### Response Parameter +1. `results(Array)`: All the details regarding place. + +#### GeoCode Result Response parameter +1. `houseNumber(string)`: the houseNumber of the address/location +2. `houseName(string)`: houseName of the address/location +3. `poi(string)`: the point of interest or famous landmark nearby the location +4. `street(string)`: the street or road of the location +5. `subSubLocality(string)`: the subSubLocality of the location +6. `subLocality(string)`: the subLocality of the location +7. `locality(string)`: the locality of the location +8. `village(string)`: the village of the location +9. `subDistrict(string)`: the subDistrict of the location +10. `district(string)`: the district of the location +11. `city(string)`: the city of the location +12. `state(string)`: the state of the location +13. `pincode(string)`: the pincode of the location +14. `formattedAddress(string)`: the general protocol following address +15. `mapplsPin(string)`: mappls pin of the particular location +16. `latitude(number)`: the latitude for the location. +17. `longitude(number)`: the longitude for the location. +18. `geocodeLevel(string)`: the best matched address component. + +## [Reverse Geocode](#reverse-geocode) +Reverse Geocoding is a process to give the closest matching address to a provided geographical coordinates (latitude/longitude). Mappls reverse geocoding API provides real addresses along with nearest popular landmark for any such geo-positions on the map. + +~~~javascript + MapplsGL.RestApi.reverseGeocode({latitude: lat, longitude: lng}) + .then(response => { + // Handle Response + }) + .catch(error => { + // Handle Error + }); +~~~ + +### Request Parameter +1. `latitude(number)`: the latitude of the location for which the address is required. +2. `longitude(number)`: the longitude of the location for which the address is required. + +### Response Paramter +1. `responseCode(number)`: Response codes of the api. +2. `version(string)`: Version of the Api. +3. `results(Array)`: All the details regarding place. + +#### Place Result Response parameter +1. `houseNumber(string)`: the houseNumber of the address/location +2. `houseName(string)`: houseName of the address/location +3. `poi(string)`: the point of interest or famous landmark nearby the location +4. `poi_dist(string)`: distance from nearest POI in metres. +5. `street(string)`: the street or road of the location +6. `street_dist(string)`: distance from nearest Street in metres. +7. `subSubLocality(string)`: the subSubLocality of the location +8. `subLocality(string)`: the subLocality of the location +9. `locality(string)`: the locality of the location +10. `village(string)`: the village of the location +11. `district(string)`: the district of the location +12. `subDistrict(string)`: the subDistrict of the location +13. `city(string)`: the city of the location +14. `state(string)`: the state of the location +15. `pincode(string)`: the pincode of the location +16. `lat(string)`: the latitude for the location. +17. `lng(string)`: the longitude for the location. +18. `formatted_address(string)`: the general protocol following address +19. `area(string)`: the area of the location. + +## [Nearby Places](#nearby-places) +Nearby Places API, enables you to add discovery and search of nearby POIs by searching for a generic keyword used to describe a category of places or via the unique code assigned to that category. + +~~~javascript +MapplsGL.RestApi.nearby({ + keyword: keyword, + location: location + }) .then(response => { + // Handle Response + }) + .catch(error => { + // Handle Error + }); +~~~ +### Request Parameters +#### Mandatory Parameters +1. `keyword(string)`: performs search on the basis of provided keyword For eg: coffee, EV Charging Station etc +2. `location(string)`: Provide the location around which the search will be performed + - `location` also support mappls pin e.g., location: "MMI000" + +#### Optional parameters +1. `page(number)`: provides number of the page to provide results from. +2. `radius(number)`: provides the range of distance to search over(default: 1000, min: 500, max: 10000) +3. `pod(string)`: it takes in the place type code which helps in restricting the results to certain chosen type. Access to this parameter is controlled from the backend. This parameter if provided will override any values provided in keywords request param. +4. `bounds(string)`: Allows the developer to send in map bounds to provide a nearby search within the bounds. {e.g. (bounds: "28.56812,77.240519;28.532790,77.290854") +5. `filter(string)`:This parameter helps you get a specific type of EV charging Station + - filter = model:(string);brandId:(string);plugType:(string) +6. `richData(boolean)`: rich data related to poi +7. `sortBy(string)`: provides configured sorting operations for the client on cloud. **Below are the available sorts:** + - `MapplsGL.RestApi.NearbyCriteria.DISTANCE_ASCENDING` + - `MapplsGL.RestApi.NearbyCriteria.DISTANCE_DESCENDING` + - `MapplsGL.RestApi.NearbyCriteria.NAME_ASCENDING` + - `MapplsGL.RestApi.NearbyCriteria.NAME_DESCENDING` +8. `userName(string)`: Use to set the user name + +### Response Parameter +1. `suggestedLocations(Array)`: List of nearby places +2. `pageInfo(PageInfo)` + +#### NearbyAtlasResult Response parameter +1. `distance(number)`: provides the distance from the provided location bias in meters. +2. `mapplsPin(string)`: Place Id of the location 6-char alphanumeric. +3. `email(string)`: Email for contact. +4. `entryLatitude(number)`: latitude of the entrance of the location. +5. `entryLongitude(number)`: longitude of the entrance of the location. +6. `keywords(Array)`: provides an array of matched keywords or codes. +7. `landlineNo(string)`: Email for contact. +8. `latitude(number)`: Latitude of the location. +9. `longitude(number)`: Longitude of the location. +10. `mobileNo(string)`: Phone number for contact. +11. `orderIndex(string)`: the order where this result should be placed +12. `placeAddress(string)`: Address of the location. +13. `placeName(string)`: Name of the location. +14. `type(string)`: Type of location POI or Country or City. +15. `city(string)`: City of the location +16. `state(string)`: State of the location +17. `pincode(string)`: Pincode of the location +18. `hourOfOperation(string)`: The hours of operation of the POI in a day. +19. `addressTokens(AddressTokens)` + +#### AddressTokens Response Result parameter +1. `houseNumber(string)`: house number of the location. +2. `houseName(string)`: house name of the location. +3. `poi(string)`: name of the POI (if applicable) +4. `street(string)`: name of the street. (if applicable) +5. `subSubLocality(string)`: the sub-sub-locality to which the location belongs. (if applicable) +6. `subLocality(string)`: the sub-locality to which the location belongs. (if applicable) +7. `locality(string)`: the locality to which the location belongs. (if applicable) +8. `village(string)`: the village to which the location belongs. (if applicable) +9. `subDistrict(string)`: the sub-district to which the location belongs. (if applicable) +10. `district(string)`: the district to which the location belongs. (if applicable) +11. `city(string)`: the city to which the location belongs. (if applicable) +12. `state(string)`: the state to which the location belongs. (if applicable) +13. `pincode(string)`: the PIN code to which the location belongs. (if applicable) + +#### PageInfo Response Result Parameter +1. `pageCount(number)`: The number of pages with results. +2. `totalHits(number)`: Total number of places in the results. +3. `totalPages(number)`: Total number of pages as per page size and no of results. +4. `pageSize(number)`: The number of results per page. + +## [Place Details](#place-details) +Mappls Place Details is a simple, standardized and precise pan-India digital address system. Every location has been assigned a unique digital address or an mapplsPin. The mapplsPin API can be used to extract the details of a place with the help of its mapplsPinn i.e. a 6 digit code or a place_id. + +~~~javascript +MapplsGL.RestApi.placeDetail( + {mapplsPin: "MMI000"} + ).then(response => { + // Handle Response + }) + .catch(error => { + // Handle Error + }); +~~~ + +### Request Parameters +#### Mandatory Parameter +1. `mapplsPin(string)`: the id or mapplsPin of the place whose details are required. The 6-digit alphanumeric code for any location. (e.g. mmi000). + +### Response Parameters +1. `mapplsPin(string)`: 6 characters alphanumeric unique identifier +2. `latitude(number)`: The latitude of the location. +3. `longitude(number)`: The longitude of the location. + +**Note: Not all response parameters are available by default. These parameters are restricted and available as per the discussed use case. For details, please contact Mappls API support.** + +## [POI Along the Route](#poi-along-the-route) +With POI Along the Route API user will be able to get the details of POIs of a particular category along his set route. The main focus of this API is to provide convenience to the user and help him in locating the place of his interest on his set route. + +~~~javascript +MapplsGL.RestApi.POIAlongRoute({ + path: path, + category: keyword, + buffer: 300, + geometries: 'polyline6', + page: 1, + }).then(response => { + // Handle Response + }) + .catch(error => { + // Handle Error + }); +~~~ +### Request Parameter +#### Mandatory Parameter +1. `category(string)`: The POI category code to be searched. Only one category input supported. +2. `path(string)`: This parameter takes the encoded route along which POIs to be searched. + +#### Optional Paramter +1. `buffer(number)`: Buffer of the road. Minimum value is `25`, maximum is `1000` and default is `25`. +2. `geometries(string)`: Type of geometry encoding. +3. `page(number)`: Used for pagination. By default, a request returns maximum `10` results and to get the next `10` or so on pass the page value accordingly. Default is 1. +4. `sort(boolean)`: Gets the sorted POIs along route. + +### Response Parameter +1. `suggestedPOIs(Array)`: List of Suggested POI location + +#### SuggestedPOI Response parameter +1. `distance(number)`: distance of the POI. +2. `mapplsPin(string)`: mapplsPin of the POI. +3. `poi(string)`: Name of the POI. +4. `subSubLocality(string)`: Sub sub locality of the POI. +5. `subLocality(string)`: Sub locality of the POI. +6. `locality(string)`: Locality of the POI. +7. `city(string)`: City of the POI. +8. `subDistrict(string)`: Sub district of the POI. +9. `district(string)`: District of the POI. +10. `state(string)`: State of the POI. +11. `poplrName(string)`: Popular name of the POI. +12. `address(string)`: Address of the POI. +13. `tel(string)`: Telephone number of the POI. +14. `email(string)`: Email of the POI. +15. `website(string)`: Website of the POI. +16. `longitude(string)`: Longitude of the POI. +17. `latitude(string)`: Latitude of the POI. +18. `e_lng(number)`: Entry longitude of the POI. +19. `e_lat(number)`: Entry latitude of the POI. +20. `brand_code(string)`: Brand id of the POI. + +


+ +For any queries and support, please contact: + +[

](https://about.mappls.com/api/) +Email us at [apisupport@mappls.com](mailto:apisupport@mappls.com) + + +![](https://www.mapmyindia.com/api/img/icons/support.png) +[Support](https://about.mappls.com/contact/) +Need support? contact us! + +

+

+ +[

](https://stackoverflow.com/questions/tagged/mappls-api)[![](https://www.mapmyindia.com/api/img/icons/blog.png)](https://about.mappls.com/blog/)[![](https://www.mapmyindia.com/api/img/icons/gethub.png)](https://github.com/Mappls-api)[

](https://www.npmjs.com/org/mapmyindia) + + + +[

](https://www.facebook.com/Mapplsofficial)[![](https://www.mapmyindia.com/june-newsletter/icon2.png)](https://twitter.com/mappls)[![](https://www.mapmyindia.com/newsletter/2017/aug/llinkedin.png)](https://www.linkedin.com/company/mappls/)[![](https://www.mapmyindia.com/june-newsletter/icon3.png)](https://www.youtube.com/channel/UCAWvWsh-dZLLeUU7_J9HiOA) + + + + +

@ Copyright 2022 CE Info Systems Ltd. All Rights Reserved.
+ +
Terms & Conditions | Privacy Policy | Supplier Sustainability Policy | Health & Safety Policy | Environmental Policy & CSR Report + +
Customer Care: +91-9999333223
diff --git a/docs/v1.0.2/Set-Regions.md b/docs/v1.0.2/Set-Regions.md new file mode 100644 index 0000000..ccb3d37 --- /dev/null +++ b/docs/v1.0.2/Set-Regions.md @@ -0,0 +1,55 @@ + +[

](https://www.mapmyindia.com/api) + + +# Setting Regions - limiting geographic area + +Source data can often contain more information than what's needed in your map. +For example, an administrative places dataset may contain data for a country OR set of countries OR contain places for the entire world; when you may only need political boundaries for North America or the USA. +In this scenario, you can specify a region in SDK to limit the geographic extent of the data that will be tiled. + +As of now, **the tiles for global maps are enabled by default** for all users as a means for users to visually experience our international maps. + +Search and Routing APIs are available for the entire world as well; but they are enabled by default for India only for all customers. +If any customer wishes to use our Search and Routing Stacks of SDKs & APIs in their apps, please contact our API Support team. + +Why limit access? + +By reducing the amount of data querying & transference required, you can reduce your API transaction costs and also reduce the amount of time it takes for your job to process. + +Now, what you as a developer need to do is to specify a region in our APIs/SDKs from the list of globally applicable region values and that's it !! [See Country List](https://github.com/mappls-api/mappls-rest-apis/blob/main/docs/countryISO.md) + +To set the region, refer to the below code. Default is India ( "IND") + +```javascript +MapplsGL.setRegion("KWT"); +``` +


+ +For any queries and support, please contact: + +[

](https://about.mappls.com/api/) +Email us at [apisupport@mappls.com](mailto:apisupport@mappls.com) + + +![](https://www.mapmyindia.com/api/img/icons/support.png) +[Support](https://about.mappls.com/contact/) +Need support? contact us! + +

+

+ +[

](https://stackoverflow.com/questions/tagged/mappls-api)[![](https://www.mapmyindia.com/api/img/icons/blog.png)](https://about.mappls.com/blog/)[![](https://www.mapmyindia.com/api/img/icons/gethub.png)](https://github.com/Mappls-api)[

](https://www.npmjs.com/org/mapmyindia) + + + +[

](https://www.facebook.com/Mapplsofficial)[![](https://www.mapmyindia.com/june-newsletter/icon2.png)](https://twitter.com/mappls)[![](https://www.mapmyindia.com/newsletter/2017/aug/llinkedin.png)](https://www.linkedin.com/company/mappls/)[![](https://www.mapmyindia.com/june-newsletter/icon3.png)](https://www.youtube.com/channel/UCAWvWsh-dZLLeUU7_J9HiOA) + + + + +

@ Copyright 2023 CE Info Systems Ltd. All Rights Reserved.
+ +
Terms & Conditions | Privacy Policy | Supplier Sustainability Policy | Health & Safety Policy | Environmental Policy & CSR Report + +
Customer Care: +91-9999333223
diff --git a/docs/v1.0.2/Set-Style.md b/docs/v1.0.2/Set-Style.md new file mode 100644 index 0000000..8c8c492 --- /dev/null +++ b/docs/v1.0.2/Set-Style.md @@ -0,0 +1,86 @@ +[

](https://www.mapmyindia.com/api) + +# [Set Mappls Map style]() + +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 + + +## [List of Available Styles]() + +Explore and choose from our map style list on [Live Demo](https://www.mapmyindia.com/api/advanced-maps/WebSDK-LiveDemo/map_style) + +To get the list of available styles: + +~~~javascript + { + + + }} + style={{flex: 1}}> + + +~~~ + + +`MapplsStyle` contains below parameters: + +1. `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. + +## [Set Mappls Style]() +To set Mappls Maps style reference code is below: + +~~~javascript + + + +~~~ + +## [To enable/disable last selected style]() +To enable/disable loading of last selected style: + +~~~javascript +MapplsGL.setShowLastSelectedStyle(value); +~~~ + + +


+ +For any queries and support, please contact: + +[

](https://about.mappls.com/api/) +Email us at [apisupport@mappls.com](mailto:apisupport@mappls.com) + + +![](https://www.mapmyindia.com/api/img/icons/support.png) +[Support](https://about.mappls.com/contact/) +Need support? contact us! + +

+

+ +[

](https://stackoverflow.com/questions/tagged/mappls-api)[![](https://www.mapmyindia.com/api/img/icons/blog.png)](https://about.mappls.com/blog/)[![](https://www.mapmyindia.com/api/img/icons/gethub.png)](https://github.com/Mappls-api)[

](https://www.npmjs.com/org/mapmyindia) + + + +[

](https://www.facebook.com/Mapplsofficial)[![](https://www.mapmyindia.com/june-newsletter/icon2.png)](https://twitter.com/mappls)[![](https://www.mapmyindia.com/newsletter/2017/aug/llinkedin.png)](https://www.linkedin.com/company/mappls/)[![](https://www.mapmyindia.com/june-newsletter/icon3.png)](https://www.youtube.com/channel/UCAWvWsh-dZLLeUU7_J9HiOA) + + + + +

@ Copyright 2023 CE Info Systems Ltd. All Rights Reserved.
+ +
Terms & Conditions | Privacy Policy | Supplier Sustainability Policy | Health & Safety Policy | Environmental Policy & CSR Report + +
Customer Care: +91-9999333223
+ diff --git a/docs/v1.0.2/Traffic-Vector-Overlay.md b/docs/v1.0.2/Traffic-Vector-Overlay.md new file mode 100644 index 0000000..0913cda --- /dev/null +++ b/docs/v1.0.2/Traffic-Vector-Overlay.md @@ -0,0 +1,67 @@ +[

](https://www.mapmyindia.com/api) + +# [Mappls Traffic Vector Tiles Overlay](#Mappls-Traffic-Vector-Tiles-Overlay) + +Mappls Traffic Vector Tiles is an overlay that you can use to display real-time traffic conditions on a map. +The overlay provides constantly updating congestion information best viewed on Mappls map (Available with all styles of Mappls Map). + +Read more for [List of Available Styles](./Set-Style.md) + +## Preview Image + +[

](https://about.mappls.com/api/) + + + +## Implementation +To enable/disable Tiles Overlay follow the below code snippet. Default is false. +```java + + + +``` + + + +Please Note : Custom styles overlaid with traffic tiles are not offered coherently. +Contact [API Support](apisupport@mappls.com) in case of custom styles and details of available custom claims of traffic tiles. + +
+ +For any queries and support, please contact: + +[

](https://about.mappls.com/api/) +Email us at [apisupport@mappls.com](mailto:apisupport@mappls.com) + + +![](https://www.mapmyindia.com/api/img/icons/support.png) +[Support](https://about.mappls.com/contact/) +Need support? contact us! + +

+

+ +[

](https://stackoverflow.com/questions/tagged/mappls-api)[![](https://www.mapmyindia.com/api/img/icons/blog.png)](https://about.mappls.com/blog/)[![](https://www.mapmyindia.com/api/img/icons/gethub.png)](https://github.com/Mappls-api)[

](https://www.npmjs.com/org/mapmyindia) + + + +[

](https://www.facebook.com/Mapplsofficial)[![](https://www.mapmyindia.com/june-newsletter/icon2.png)](https://twitter.com/mappls)[![](https://www.mapmyindia.com/newsletter/2017/aug/llinkedin.png)](https://www.linkedin.com/company/mappls/)[![](https://www.mapmyindia.com/june-newsletter/icon3.png)](https://www.youtube.com/channel/UCAWvWsh-dZLLeUU7_J9HiOA) + + + + +

@ Copyright 2023 CE Info Systems Ltd. All Rights Reserved.
+ +
Terms & Conditions | Privacy Policy | Supplier Sustainability Policy | Health & Safety Policy | Environmental Policy & CSR Report + +
Customer Care: +91-9999333223
+ diff --git a/docs/v1.0.2/User-Location.md b/docs/v1.0.2/User-Location.md new file mode 100644 index 0000000..d553e04 --- /dev/null +++ b/docs/v1.0.2/User-Location.md @@ -0,0 +1,66 @@ +[

](https://www.mapmyindia.com/api) + +# UserLocation +## MapplsGL.UserLocation + + +### props +| Prop | Type | Default | Required | Description | +| ---- | :--: | :-----: | :------: | :----------: | +| animated | `bool` | `true` | `false` | Whether location icon is animated between updates | +| renderMode | `enum` | `'normal'` | `false` | Rendermode of user location icon.
One of `"normal"`, `"custom"`.
"custom" must be of type mapbox-gl-native components | +| visible | `bool` | `true` | `false` | Whether location icon is visible | +| onPress | `func` | `none` | `false` | Callback that is triggered on location icon press | +| onUpdate | `func` | `none` | `false` | Callback that is triggered on location update | +| minDisplacement | `number` | `0` | `false` | FIX ME NO DESCRIPTION | +| children | `any` | `none` | `false` | Custom location icon of type mapbox-gl-native components | + +### methods +#### setLocationManager({running}) + +Whether to start or stop the locationManager
Notice, that locationManager will start automatically when
either `onUpdate` or `visible` are set + +##### arguments +| Name | Type | Required | Description | +| ---- | :--: | :------: | :----------: | +| `{running}` | `n/a` | `Yes` | undefined | + + +#### needsLocationManagerRunning() + +If locationManager should be running + +##### arguments +| Name | Type | Required | Description | +| ---- | :--: | :------: | :----------: | + + +


+ +For any queries and support, please contact: + +[

](https://about.mappls.com/api/) +Email us at [apisupport@mappls.com](mailto:apisupport@mappls.com) + + +![](https://www.mapmyindia.com/api/img/icons/support.png) +[Support](https://about.mappls.com/contact/) +Need support? contact us! + +

+

+ +[

](https://stackoverflow.com/questions/tagged/mappls-api)[![](https://www.mapmyindia.com/api/img/icons/blog.png)](https://about.mappls.com/blog/)[![](https://www.mapmyindia.com/api/img/icons/gethub.png)](https://github.com/Mappls-api)[

](https://www.npmjs.com/org/mapmyindia) + + + +[

](https://www.facebook.com/Mapplsofficial)[![](https://www.mapmyindia.com/june-newsletter/icon2.png)](https://twitter.com/mappls)[![](https://www.mapmyindia.com/newsletter/2017/aug/llinkedin.png)](https://www.linkedin.com/company/mappls/)[![](https://www.mapmyindia.com/june-newsletter/icon3.png)](https://www.youtube.com/channel/UCAWvWsh-dZLLeUU7_J9HiOA) + + + + +

@ Copyright 2022 CE Info Systems Ltd. All Rights Reserved.
+ +
Terms & Conditions | Privacy Policy | Supplier Sustainability Policy | Health & Safety Policy | Environmental Policy & CSR Report + +
Customer Care: +91-9999333223
diff --git a/docs/v1.0.2/Version-History.md b/docs/v1.0.2/Version-History.md new file mode 100644 index 0000000..81889ca --- /dev/null +++ b/docs/v1.0.2/Version-History.md @@ -0,0 +1,13 @@ +## [Version History](#Version-History) + + +| Version | Last Updated | Author | Release Note| +| ---- | ---- | ---- | ---- | +| v1.0.7 | 05 June 2023 | Mappls API Team ([MA](https://github.com/mdakram)) ([ST](https://github.com/saksham66)) | - Security Improvements
- Bug Fixes & Improvements | +| v1.0.6 | 05 June 2023 | Mappls API Team ([MA](https://github.com/mdakram)) ([ST](https://github.com/saksham66)) | - Added `Cost Estimation` Api
- Bug Fixes | +| v1.0.5 | 02 May 2023 | Mappls API Team ([MA](https://github.com/mdakram)) ([ST](https://github.com/saksham66)) | - Added `responseLang` parameter in Autosuggest
- Added `lang` parameter in reverse geocode
- Bug Fixes | +| v1.0.4 | 12 April 2023 | Mappls API Team ([MA](https://github.com/mdakram)) ([ST](https://github.com/saksham66)) | - Bug Fixes | +| v1.0.3 | 24 November 2022 | Mappls API Team ([MA](https://github.com/mdakram)) ([ST](https://github.com/saksham66)) | - Bug Fixes | +| v1.0.2 | 28 August 2022 | Mappls API Team ([MA](https://github.com/mdakram)) ([ST](https://github.com/saksham66)) | - Added Place click callback
- Update Place detail API
- Bug Fixes | +| v1.0.1 | 8 September 2022 | Mappls API Team ([MA](https://github.com/mdakram)) ([ST](https://github.com/saksham66)) | - Bug Fixes| +| v1.0.0 | 24 August 2022 | Mappls API Team ([MA](https://github.com/mdakram)) ([ST](https://github.com/saksham66)) | -Initial release | \ No newline at end of file diff --git a/docs/v1.0.2/Weather-API.md b/docs/v1.0.2/Weather-API.md new file mode 100644 index 0000000..fb28fd0 --- /dev/null +++ b/docs/v1.0.2/Weather-API.md @@ -0,0 +1,174 @@ +[

](https://www.mapmyindia.com/api) + +# Weather API + +Mappls SDK enables the developer to access current weather conditions around India with below list paramenters: + +1. Air quality index +2. Temperature +3. Humidity +4. Wind +5. Visibility + +### [Weather](#weather) +```javascript +try{ + const weatherResponse = await MapplsGL.RestApi.weather(params); + //Do something with result + }catch(e){ + //error logs + console.log(e); + } +``` +### Request Parameters + +#### Mandatory Parameter +1. `location (Double, Double)`: Location of the place. + +#### Optional Parameter +1. `tempUnit (String)`: Unit of temperature. **Below are the available value:** + - WeatherCriteria.UNIT_CELSIUS: for centigrate(°C) + - WeatherCriteria.UNIT_FARENHEIT: for farenheit (F) +2. `theme (String)`: This parameter is used to define the theme of icon. **Below are the available value:** + - WeatherCriteria.THEME_LIGHT (Default) + - WeatherCriteria.THEME_DARK +3. `size (String )`: This parameter is used to define the size of icon. **Below are the available value:** + - WeatherCriteria.SIZE_36PX (Default) + - WeatherCriteria.SIZE_24PX +4. `unitType (String)`: This parameter defines the unit type on the basis of which weather forecast information is sought for. **Below are the available value:** + - WeatherCriteria.UNIT_TYPE_DAY + - WeatherCriteria.UNIT_TYPE_HOUR +5. `unit (Integer)`: This parameter is the value for which forecast information is sought for. Valid values are: + - For Days + - `1` + - `5` + - `10` + - For Hours + - `1` + - `24` + +### Response Code (as HTTP response code) + +#### Success: + +1. 200: To denote a successful API call. +2. 204: To denote the API was a success but no results we’re found. + +#### Client side issues: + +1. 400: Bad Request, User made an error while creating a valid request. +2. 401: Unauthorized, Developer’s key is not allowed to send a request with restricted parameters. +3. 403: Forbidden, Developer’s key has hit its daily/hourly limit. + +#### Server-Side Issues: + +1. 500: Internal Server Error, the request caused an error in our systems. +2. 503: Service Unavailable, during our maintenance break or server downtimes. + +### Response Messages (as HTTP response message) + +1. 200: Success. +2. 204: No matches we’re found for the provided query. +3. 400: Something’s just not right with the request. +4. 401: Access Denied. +5. 403: Services for this key has been suspended due to daily/hourly transactions limit. +6. 500: Something went wrong. +7. 503: Maintenance Break. + +## Response parameters +1. `data` (`WeatherData`) + +#### WeatherData result parameters: +1. `temperature` (`WeatherTemperature`) + #### WeatherTemperature result parameters: + 1. `value` (`Double`): Temperature value.For eg:31.3 + 2. `unit` (`String`): Temperature unit.For eg:"°C" + +2. `weatherCondition` (`WeatherCondition`): Weather condition info + + #### WeatherCondition result parameters: + 1. `weatherId` (`Integer`): Id of Weather condition. For eg:5 + 2. `weatherText` (`String`): Weather condition info text.For eg:"Hazy sunshine" + 3. `weatherDescription` (`String`): Description of weather For eg: "Total cloud cover between 20%-60%" + 4. `weatherIcon` (`String`): Weather condition icon url. + 5. `realFeelWeatherText` (`String`):Description of weather For eg:"Feels Like 41.0 °C" + + +3. `airQuality` (`AirQuality`): Air Quality info + #### AirQuality result parameters: + 1. `airQualityIndex` (`Integer`): Give the value of air quality index. For eg:104 + 2. `airQualityIndexText` (`String`): Description for AQI given. For eg: "Unhealthy for Sensitive Groups" + 3. `airQualityIndexUnit` (`String`): Gives the values of airquality index unit. For eg: "PM2.5" + +4. `humidity` (`Humidity`): Humidity info + + #### Humidity result parameters: + 1. `relHumidity` (`Integer`): Provides the value for humidity. For Eg: 65 + 2. `indoorRelHumidity` (`Integer`): Provide value for indoor relative humidity . For eg: 65 + +5. `wind` (`Wind`): Wind Info + + #### Wind result parameters: + 1. `windSpeed`(`Double`):For Eg:12.8 + 2. `windSpeedUnit` (`String`):For Eg: "KM/H" + 3. `windAngle` (`Integer`):For Eg: 338 + 4. `windAngleUnit` (`String`): For Eg: "NNW" + +6. `visibility` (`WeatherVisibility`): Visibility Info + #### WeatherVisibility result parameters: + 1. `value` (`Integer`): Visibilty value. For eg: 2 + 2. `unit` (`String`): Unit of Visibilty value. For eg: "KM" + +7. `forecastData` (List<`ForecastData`>): This feature is available for your solutions to get forecast details. The API is able to populate current weather condition and `forecast` of `1`, `5` & `10` days (depending on input)or hours based forecast for `1` hr and `24` hrs. + +#### ForecastData result parameters: +1. `hour`(`String`): Value Returned when request is made for hours. For eg: "26/09/2022 18:00", +2. `date` (`String`): Value Returned when request is made for multiple day/days. For eg: "28/09/2022", +3. `day` (`String`): Represents day name when request is made for multiple day/days. For eg: "Wednesday". +4. `temperature` (`WeatherTemperature`): + + - `minTemperature`(`Double`): Minimum temperature value for the day/night.For eg:31.3 + - `minTemperatureUnit` (`String`): Minimum Temperature Unit. For eg:"°C" + - `maxTemperature` (`Double`): Maximum Temperature value for the day/night.For eg:31.3 + - `maxTemperatureUnit` (`String`): Maximum Temperature Unit. For eg:"°C" + +5. `weatherCondition` (`WeatherCondition`) + + - `weatherIdDay` (`Integer`): Shows the ID of the day For Eg: 1 + - `weatherTextDay` (`String`): Shows the forcast description for the day For Eg: "Sunny" + - `weatherIconDay` (`String`): Shows the forcast icon for day For Eg: "1.png" + - `weatherIdNight` (`Integer`): Shows the ID of the night For Eg: 33 + - `weatherTextNight` (`String`): Shows the forcast description for the night For Eg: "Clear" + - `weatherIconNight` (`String`): Shows the forcast icon for the night For Eg: "33.png" + + +


+ +For any queries and support, please contact: + +[

](https://about.mappls.com/api/) +Email us at [apisupport@mappls.com](mailto:apisupport@mappls.com) + + +![](https://www.mapmyindia.com/api/img/icons/support.png) +[Support](https://about.mappls.com/contact/) +Need support? contact us! + +

+

+ +[

](https://stackoverflow.com/questions/tagged/mappls-api)[![](https://www.mapmyindia.com/api/img/icons/blog.png)](https://about.mappls.com/blog/)[![](https://www.mapmyindia.com/api/img/icons/gethub.png)](https://github.com/Mappls-api)[

](https://www.npmjs.com/org/mapmyindia) + + + +[

](https://www.facebook.com/Mapplsofficial)[![](https://www.mapmyindia.com/june-newsletter/icon2.png)](https://twitter.com/mappls)[![](https://www.mapmyindia.com/newsletter/2017/aug/llinkedin.png)](https://www.linkedin.com/company/mappls/)[![](https://www.mapmyindia.com/june-newsletter/icon3.png)](https://www.youtube.com/channel/UCAWvWsh-dZLLeUU7_J9HiOA) + + + + +

@ Copyright 2023 CE Info Systems Ltd. All Rights Reserved.
+ +
Terms & Conditions | Privacy Policy | Supplier Sustainability Policy | Health & Safety Policy | Environmental Policy & CSR Report + +
Customer Care: +91-9999333223
+ diff --git a/package.json b/package.json index 602a11a..5184f73 100644 --- a/package.json +++ b/package.json @@ -20,10 +20,10 @@ "@react-navigation/stack": "^5.2.3", "@turf/turf": "^5.1.6", "mappls-nearby-widget-react-native": "1.0.0", - "mappls-direction-widget-react-native": "1.0.0", + "mappls-direction-widget-react-native": "1.1.0", "mappls-geofence-widget-react-native": "1.0.0", - "mappls-map-react-native": "1.0.2", - "mappls-search-widgets-react-native": "1.0.1", + "mappls-map-react-native": "1.0.7", + "mappls-search-widgets-react-native": "1.1.0", "mappls-polyline": "1.0.0", "radio-buttons-react-native": "^1.0.4", "react": "17.0.2", diff --git a/src/App.js b/src/App.js index 523cf70..a5ce3a1 100644 --- a/src/App.js +++ b/src/App.js @@ -21,10 +21,9 @@ LogBox.ignoreLogs([ const Stack = createStackNavigator(); -const atlasClientId = - ''; -const atlasClientSecret = - ''; + +const atlasClientId =''; +const atlasClientSecret =''; const mapSDKKey = ''; const restAPIKey = ''; diff --git a/src/scenes/AddElocMarkerActivity.js b/src/scenes/AddMapplsPinMarkerActivity.js similarity index 89% rename from src/scenes/AddElocMarkerActivity.js rename to src/scenes/AddMapplsPinMarkerActivity.js index 9007369..546ad3a 100644 --- a/src/scenes/AddElocMarkerActivity.js +++ b/src/scenes/AddMapplsPinMarkerActivity.js @@ -5,7 +5,7 @@ import {DEFAULT_CENTER_COORDINATE} from '../utils/index'; import exampleIcon from '../assets/marker.png'; import Toast from 'react-native-simple-toast'; -class AddElocMarkerActivity extends Component { +class AddMapplsPinMarkerActivity extends Component { @@ -31,4 +31,4 @@ class AddElocMarkerActivity extends Component { } } -export default AddElocMarkerActivity; +export default AddMapplsPinMarkerActivity; diff --git a/src/scenes/AnimatedMarker.js b/src/scenes/AnimatedMarker.js new file mode 100644 index 0000000..d50effa --- /dev/null +++ b/src/scenes/AnimatedMarker.js @@ -0,0 +1,77 @@ +import React, { useState,useEffect, useRef } from 'react'; +import { StyleSheet, View, Animated } from 'react-native'; +// import MapView, { Marker } from 'react-native-maps'; +import MapplsGL from 'mappls-map-react-native'; + + + + +const AnimatedMarker = () => { + const fromCoords = useRef([77.202482, 28.594418]); + const toCoords = useRef([77.186016, 28.554948]); +// const fromCoordss = [77.202482, 28.594418]; +// const toCoords = [77.186016, 28.554948]; + const [animationIndex, setAnimationIndex] = useState(0); + const [currentCoords, setCurrentCoords] = useState(fromCoords.current); + + + + useEffect(() => { + const animate = () => { + setAnimationIndex(animationIndex => animationIndex + 1); + requestAnimationFrame(animate); + }; + + requestAnimationFrame(animate); + }, []); + + useEffect(() => { + // const { lng: fromLng, lat: fromLat } = fromCoords.current; + // const { lng: toLng, lat: toLat } = toCoords.current; + + const diffLng = toCoords.current[0] - fromCoords.current[0]; + const diffLat = toCoords.current[1] - fromCoords.current[1]; + const fraction = animationIndex / 300; + const currentLng = fromCoords.current[0] + diffLng * fraction; + const currentLat = fromCoords.current[1] + diffLat * fraction; + setCurrentCoords([currentLng, currentLat]); + }, [animationIndex, fromCoords, toCoords]); + + useEffect(() => { + console.log(currentCoords); + }, [currentCoords]); + + return ( + + + + + + + + + + ); +}; + +const styles = StyleSheet.create({ + container: { + ...StyleSheet.absoluteFillObject, + justifyContent: 'flex-end', + alignItems: 'center' + }, + map: { + ...StyleSheet.absoluteFillObject + }, + object: { + width: 32, + height: 32, + borderRadius: 16, + backgroundColor: 'red' + } +}); +export default AnimatedMarker; \ No newline at end of file diff --git a/src/scenes/DrawCirclePolygonActivity.js b/src/scenes/DrawCirclePolygonActivity.js new file mode 100644 index 0000000..a101728 --- /dev/null +++ b/src/scenes/DrawCirclePolygonActivity.js @@ -0,0 +1,61 @@ +import React, {Component} from 'react'; +import {Text, View, TouchableOpacity, StyleSheet} from 'react-native'; +import MapplsGL from 'mappls-map-react-native'; + import { circle,point,feature } from '@turf/turf'; + + + +const layerStyles = { + route: { + fillColor: 'blue', + fillOpacity: 0.5, + }, + }; + + class DrawCirclePolygonActivity extends Component { + constructor(props) { + super(props); + this.state = { + featureCollection: null, + }; + } + componentDidMount() { + const center = [77.22263216972351, 28.62292461876685]; + const radius = 800; // Example radius in kilometers + + var options = {steps: 100, units: 'meters', properties: {foo: 'bar'}}; + var circlePolygon = circle(center, radius, options); + + // Set the new feature collection in the state + this.setState({ featureCollection: circlePolygon }); + } + + render() { + const { featureCollection } = this.state; + return ( + + + + + + + + + ); + } + } + + export default DrawCirclePolygonActivity; \ No newline at end of file diff --git a/src/scenes/Home.js b/src/scenes/Home.js index dc23de3..36ca7f3 100644 --- a/src/scenes/Home.js +++ b/src/scenes/Home.js @@ -20,7 +20,7 @@ import NearbyActivity from './NearbyActivity'; import ReverseGeoCodeActivity from './ReverseGeoCodeActivity'; import SemiCircleActivity from './SemiCircleActivity'; import CameraElocActvity from './CameraElocActivity'; -import AddElocMarkerActivity from './AddElocMarkerActivity'; +import AddMapplsPinMarkerActivity from './AddMapplsPinMarkerActivity'; import CameraElocBoundsActvity from './CameraElocBoundsActivity' import TrackingAnimationActivity from './TrackingAnimationActivity' import DirectionWidgetActivity from './DirectionWidgetActivity' @@ -33,6 +33,8 @@ import GeoAnalyticsActvity from './GeoAnalyticsActivity'; import IndoorActivity from './IndoorActivity'; import PoiAlongTheRouteActivity from './PoiAlongTheRouteActivity'; import HateOsNearbyActivity from './HateOsNearbyActivity'; +import AnimatedMarker from './AnimatedMarker'; +import DrawCirclePolygonActivity from './DrawCirclePolygonActivity'; const styles = StyleSheet.create({ header: { @@ -76,10 +78,12 @@ const Examples = [ new ExampleItem('Map Tap', MapTapActivity), new ExampleItem('Map Long Tap', MapLongTapActivity), new ExampleItem('Add Marker', AddMarkerActivity), - new ExampleItem('Add Mappls Pin Marker', AddElocMarkerActivity), + new ExampleItem('Add Mappls Pin Marker', AddMapplsPinMarkerActivity), new ExampleItem('Add Custom Marker', AddCustomMakerActivity), + new ExampleItem('Marker Animation', AnimatedMarker), new ExampleItem('Draw PolyLine', DrawPolylineActivity), new ExampleItem('Draw Polygon', DrawPolygonActivity), + new ExampleItem('Draw Circle Polygon', DrawCirclePolygonActivity), new ExampleItem('Draw Gradient Polyline', DrawGradientPolyline), new ExampleItem('Current Location', CurrentLocationActivity), new ExampleItem('Auto Suggest', AutoSuggestActivity),