Giter Site home page Giter Site logo

simple-location-picker's Introduction

Simple Location Picker

Create simple google maps location picker with

  • Here maps place api
  • Retrofit
  • Coroutines

simple-location-picker's People

Contributors

kucingapes avatar

Stargazers

Farid Ramadhan avatar エクセル avatar Irfan Irawan Sukirman, S,Kom avatar Julsapargi Nursam avatar Samuel B. Jeffersen avatar Arif R Gilang avatar R. Rifa Fauzi Komara avatar M. Hafizh Anbiya avatar

Watchers

James Cloos avatar Irfan Irawan Sukirman, S,Kom avatar Muhammad Utsman avatar

simple-location-picker's Issues

Error RetrofitInstance : No Retrofit annotation found. (parameter #3)

2020-09-09 07:26:17.504 29565-29624 W/System.err: java.lang.IllegalArgumentException: No Retrofit annotation found. (parameter #3)
2020-09-09 07:26:17.504 29565-29624 W/System.err:     for method RetrofitInstance.getLocation
2020-09-09 07:26:17.505 29565-29624 W/System.err:     at retrofit2.Utils.methodError(Utils.java:52)
2020-09-09 07:26:17.505 29565-29624 W/System.err:     at retrofit2.Utils.methodError(Utils.java:42)
2020-09-09 07:26:17.505 29565-29624 W/System.err:     at retrofit2.Utils.parameterError(Utils.java:61)
2020-09-09 07:26:17.505 29565-29624 W/System.err:     at retrofit2.RequestFactory$Builder.parseParameter(RequestFactory.java:311)
2020-09-09 07:26:17.505 29565-29624 W/System.err:     at retrofit2.RequestFactory$Builder.build(RequestFactory.java:182)
2020-09-09 07:26:17.505 29565-29624 W/System.err:     at retrofit2.RequestFactory.parseAnnotations(RequestFactory.java:65)
2020-09-09 07:26:17.505 29565-29624 W/System.err:     at retrofit2.ServiceMethod.parseAnnotations(ServiceMethod.java:25)
2020-09-09 07:26:17.505 29565-29624 W/System.err:     at retrofit2.Retrofit.loadServiceMethod(Retrofit.java:168)
2020-09-09 07:26:17.505 29565-29624 W/System.err:     at retrofit2.Retrofit$1.invoke(Retrofit.java:147)
2020-09-09 07:26:17.505 29565-29624 W/System.err:     at java.lang.reflect.Proxy.invoke(Proxy.java:813)
2020-09-09 07:26:17.505 29565-29624 W/System.err:     at $Proxy3.getLocation(Unknown Source)
2020-09-09 07:26:17.505 29565-29624 W/System.err:     at com.safwah.iwarga.ui.profile.map.MapsFragment$getLocation$1.invokeSuspend(MapsFragment.kt:127)
2020-09-09 07:26:17.505 29565-29624 W/System.err:     at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
2020-09-09 07:26:17.505 29565-29624 W/System.err:     at kotlinx.coroutines.DispatchedTask.run(Dispatched.kt:236)
2020-09-09 07:26:17.505 29565-29624 W/System.err:     at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:594)
2020-09-09 07:26:17.506 29565-29624 W/System.err:     at kotlinx.coroutines.scheduling.CoroutineScheduler.access$runSafely(CoroutineScheduler.kt:60)
2020-09-09 07:26:17.506 29565-29624 W/System.err:     at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:742)

Code

    @GET("/v1/revgeocode")
    suspend fun getLocation(
        @Query("at") at: String,
        @Query("apiKey") apiKey: String
    ): Call<Places>

    companion object {
        fun create(): RetrofitInstance {
            val logging = HttpLoggingInterceptor()
            logging.level = HttpLoggingInterceptor.Level.BODY

            val client = OkHttpClient.Builder()
                .addInterceptor(logging)
                .build()

            val retrofit = Retrofit.Builder()
                .baseUrl(BASE_URL_MAP)
                .addConverterFactory(GsonConverterFactory.create())
                .client(client)
                .build()
            return retrofit.create(RetrofitInstance::class.java)
        }
    }

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.