danielemoraschi / maplace.js

A Google Maps Javascript plugin for jQuery.
http://maplacejs.com/
MIT License
999 stars 190 forks source link

Missing possibility to use addresses #170

Open GRAFIX21 opened 7 years ago

GRAFIX21 commented 7 years ago

Hello, first I would like to say: Maplace feels really well constructed.

But I have one special need for less experienced users. Currently I mainly use the gomaps-plugin for displaying maps, because we can set markers by coordinates or simply by an address (where the script makes the work to get the geo-data from google maps). Sure this ist not the prefered way and even has a bad performance. But it is the most simple way for some people and for setting just a hand full of markers on websites with less traffic.

Could you implement a comparable solution to set markers not by a pair of latitude and longitute but by giving the postal address in the data array?

danielemoraschi commented 7 years ago

Hi, thank you for the feedback!

I still think that Maplace should stay as "tiny" as possible and let the user implement the application logic using the library just as an helper to place markers on the map. It should not be Maplace responsibility handle how those locations get generated. Also, other users not interested in the geolocation functionality will have to load unused code in their pages for no reason. But I see your point, and I will look to implement some sort of plugin mechanism to plug new functionalities only as necessary, or something similar.

For now, please check out my example with user input address and let me know if it's of any help: https://jsfiddle.net/_tomorro/Lfwn7g6f/ I'm sure it can be extended quite easily to manage more complex stuff.