This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NearbyPlaceAPI.builder(getApplicationContext()) | |
.setDistance(.5) // distance unit in KM | |
.setLimit(10) // return places list size | |
.setLatLng(latitude, longitude) | |
.build() | |
.generateNearbyPlaceListByType(new NearbyPlaceListener() { | |
@Override | |
public void onPlaceListReceived(ArrayList<NearbyPlace> places) { | |
Toast.makeText(MainActivity.this, ""+places.get(0).getAddress(), Toast.LENGTH_SHORT).show(); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ReverseGeoAPI.builder(getApplicationContext()) | |
.setLatLng(Double.parseDouble(lat.getText().toString()),Double.parseDouble(lon.getText().toString())) | |
.setAdditionalParams(new ReverseGeoParams[]{DISTRICT, ADDRESS_COMPONENTS}) | |
.build() | |
.getAddress(new ReverseGeoAPIListener() { | |
@Override | |
public void reversedAddress(ReverseGeoPlace place) { | |
Toast.makeText(MainActivity.this, ""+place.getAddress()+ " "+place.getAddressComponents().getHouse()+" "+place.getDistrict(), Toast.LENGTH_SHORT).show(); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
searchAutocompleteFragment =(SearchAutocompleteFragment)getSupportFragmentManager().findFragmentById(R.id.place_autocomplete_fragment); | |
searchAutocompleteFragment.setBangla(true); | |
searchAutocompleteFragment.setPlaceSelectionListener(new SearchAutocompleteFragment.PlaceSelectionListener() { | |
@Override | |
public void onPlaceSelected(SearchAutoCompletePlace place) { | |
Toast.makeText(MainActivity.this, ""+place.getAddress()+ " \n lat: "+ place.getLatitude()+"\nlon: "+place.getLongitude() , Toast.LENGTH_SHORT).show(); | |
} | |
@Override | |
public void onFailure(String error) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<fragment | |
android:id="@+id/barikoiSearchAutocompleteFragment" | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
android:name="barikoi.barikoilocation.SearchAutoComplete.SearchAutocompleteFragment"/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
allprojects { | |
repositories { | |
... | |
maven { url 'https://jitpack.io' } | |
} | |
} | |
dependencies { | |
implementation 'com.github.barikoi:BarikoiLocationLibrary:1.2.6' | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//initialize the library using api key | |
BarikoiTrace.initialize(this,"BARIKOI API KEY"); | |
//create of log in user by name , email , phone number (phone numberis required, others are nullable) | |
BarikoiTrace.setOrCreateUser("NAME","EMAIL_ADDRESS","PHONE_NUMBER", new BarikoiTraceUserCallback() { | |
@Override | |
public void onFailure(BarikoiTraceError barikoiError) { | |
Log.e("userfail", barikoiError.getMessage()); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
allprojects { | |
repositories { | |
.... | |
maven { url 'https://jitpack.io' } | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dependencies { | |
implementation 'com.github.barikoi:barikoitrace-android-sdk:f6b8a7f1dd' | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
API | Barikoi | ||
---|---|---|---|
Geocoding | BDT 25 | BDT 420 | |
Reverse Geocoding | BDT 25 | BDT 420 | |
Autocomplete | BDT 25 | BDT 237-BDT 1428 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function initMap() { | |
const defaultLatLng = new google.maps.LatLng(23.7624286, 90.378406); | |
// Google map options | |
let mapOptions = { | |
zoom: 12, | |
center: defaultLatLng | |
} | |
const map = new google.maps.Map(document.getElementById("map"), mapOptions) | |
NewerOlder