GooglemapMvc icon indicating copy to clipboard operation
GooglemapMvc copied to clipboard

Places Autocomplete

Open ashutosh-chauhan opened this issue 10 years ago • 10 comments

hi, i am using this api in my application and its works great but i have some concern about how to use "Places Autocomplete TextBox" with this control, i am not find any example related this.

ashutosh-chauhan avatar Sep 26 '15 05:09 ashutosh-chauhan

Any luck with this?

kgarsuta avatar Dec 09 '15 22:12 kgarsuta

This is not implemented in the control. I will try to look into it as soon as I can.

Thanks for your feedback

jmelosegui avatar Dec 10 '15 01:12 jmelosegui

Thanks, I look forward to it

kgarsuta avatar Dec 10 '15 20:12 kgarsuta

In order to help on this:

  • I've been able to add the code needed to implement the searchbox without changes to the control.
  • The control provices the client event .OnMapLoaded("mapEvent"); using this event you have access to map control, and you can use the existing code suggested in https://developers.google.com/maps/documentation/javascript/examples/places-searchbox to implement the SearchBox.

The problem I tried to overcome is to provide the '&libraries=places' on the google apis script, in order to load the library. I forked the project, but for some reason I cannot compile it.

I would suggest to create a new method in order to provide support for the 'libraries" part, for the google apis script registration.

Having the ability to load a library, would help to implement features that they are currenlty not supported.

gcapnias avatar May 09 '16 13:05 gcapnias

Hi @gcapnias,

Thank for all your input in this project. I really appreciate it.

I forked the project, but for some reason I cannot compile it.

Could you share the error message? Maybe I can try to help you with that (If you want we can use https://gitter.im/jmelosegui/GooglemapMvc).

I would suggest to create a new method in order to provide support for the 'libraries" part, for the google apis script registration.

Maybe a new issue to track this down?

Having the ability to load a library, would help to implement features that they are currently not supported.

Totally agree. And I would love to review and accept any PR (right now I am not putting to much work into this control).

jmelosegui avatar May 09 '16 17:05 jmelosegui

I realized the it was a VS2015 project - I have made a pull request for you.

I have created a Libraries property of the map control, in order to be able to load Google Maps libraries.

In order to prove the functionality, I have created two new examples, Places search box and Drawing tools.

gcapnias avatar May 11 '16 14:05 gcapnias

@ashutosh-chauhan @kgarsuta

Thanks to @gcapnias we now have a way to workaround the lack of this feature using the "mvc way".

See this for more detail.

jmelosegui avatar May 17 '16 17:05 jmelosegui

I will leave this open until we have an mvc implementation, though.

jmelosegui avatar May 17 '16 17:05 jmelosegui

I tried Nuget 0.8 and 0.8.16 beta as well but .Libraries("") property is not there can you please upgrade the Nuget package with that property

dnxit avatar Nov 01 '16 10:11 dnxit

Hi @afzalgujrat

I know that is something I have pending. In the meantime, you can use the self-service-releases.

jmelosegui avatar Nov 04 '16 12:11 jmelosegui