-
Notifications
You must be signed in to change notification settings - Fork 14
MapmyIndia Place Picker
Saksham66 edited this page Sep 24, 2020
·
3 revisions
MapmyIndia Place Picker Plugin can be used to choose a specific location.
To add the place picker widget
Intent intent = new PlacePicker.IntentBuilder()
.placeOptions(placePickerOptions).build(this);
startActivityForResult(intent, 101);
val intent = PlacePicker.IntentBuilder()
.placeOptions(placePickerOptions).build(this)
startActivityForResult(intent, 101)
You can use PlacePickerOptions
to set the following properties:
-
toolbarColor(Integer)
: To set the toolbar color of place widget -
startingBounds(LatLngBounds)
: To open a map in a bound -
statingCameraPosition(CameraPosition)
: To open a map that sets in camera poition you can set zoom, centre, bearing etc., -
includeDeviceLocationButton(Boolean)
: To enable/ disable current location functionality -
marker(Integer)
: To change the marker image which is visible in the centre of a map -
mapMaxZoom(Double)
: To set maximum zoom level of the map -
mapMinZoom(Double)
: To set minimum zoom level of the map -
includeSearch(Boolean)
: To provide opions for search locations -
searchPlaceOption(PlaceOptions)
: To set all the properties of search widget
To get the pick place:
@Override
protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if (requestCode == 101 && resultCode == RESULT_OK) {
Place place = PlacePicker.getPlace(data);
}
}
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
super.onActivityResult(requestCode, resultCode, data)
if(requestCode == 101 && resultCode == Activity.RESULT_OK) {
val place: Place? = PlacePicker.getPlace(data!!)
}
}
Email us at [email protected]
Ask a question under the mapmyindia-api
Need support? contact us!
Read about the latest updates & customer stories
© Copyright 2020. CE Info Systems Pvt. Ltd. All Rights Reserved. | Terms & Conditions.
- Map UI Settings
- Set Country Regions
- Set MapmyIndia MapStyle
- REST API Kit
- MapmyIndia GeoAnalytics
- Place Autocomple Widget
- MapmyIndia Safety Plugin
- MapmyIndia Interactive Layer
- MapmyIndia GeoFence View
- MapmyIndia Safety Strip
- MapmyIndia Place Picker
- MapmyIndia Scalebar Plugin
- ELocation Strategy
- MapmyIndia Direction Widget
- MapmyIndia Nearby Search Widget
- Version History
- Country List