Coder Social home page Coder Social logo

craft-mapbox's People

Contributors

lindseydiloreto avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Forkers

webrgp

craft-mapbox's Issues

Configurable language for the address field

I've noticed that the address field always returns results in English, which is not great for sites in a different language. I haven't found a way to configure the language for the address autofill, or did I miss it?

The API supports a language parameter to control the language for search results.

I think this should be addressed (pun alert) in the following ways:

  1. By default, autofill should use the current user's language.
  2. A plugin configuration option should be added to force a specific language (the Google Maps plugin supports this with the fieldParams config option).

Add support for conducting a Proximity Search

It would be great if we could add proximity search functionality. This would give us the ability to "find the nearest location" of a given user-specified address string.

We will need to tap into the Mapbox Geocoding API to perform geocoding lookups of the user-specified address string.

While no specific ETA is available, we consider this issue to be one of our top priorities. 🚩

Center or bounds map issue with only 1 location or no locations

I may be doing something wrong. My location entries have an address field.

{% set locations = craft.entries().section('locations').all() %}
{% set options = {
    'id': 'my-map'
} %}
{{ mapbox.map(locations, options).tag() }}

If I query multiple entries, everything works as expected. All the markers appear and the map uses the locations as it's bounds/center.

But if I only have one result, either by filtering or setting .limit(1), the location marker appears but the map looks like it uses the default center value [0,0]. I'm guessing maybe bounds needs more than one set of location coordinates to work?

Similar happens if I have no results, either by filtering the query or by setting the locations variable to an empty array []. That's to be expected with no locations set, but then I've had no luck setting a fallback center and zoom using either the center or zoom dynamic map options or by using the zoom or center universal methods.

Maybe I'm not setting the values of those options or methods correctly. Could you possibly give me an example that works using a) just 1 location and b) no locations (an empty map but with a custom center).

Thanks in advance!

Address Field: Name Field For Geocoding Missing

The Google Maps Plugin has a dedicated name field where you can input location names, city names without providing a street name etc.

We would like to switch from Google Maps to Mapbox because the API key handling is much more straightforward, especially when working with clients. However, the geocoding autocomplete feature currently only works with street names, not with full addresses and location names – this option is very important for us.

Is there a reason why the Mapbox Plugin comes without the name field or are we missing something?

Thank you!

Support different addresses per site

Supporting different addresses per site for multi-site setups would be a great feature. Similar to this issue for the Google Maps plugin.

I would like to see:

  • Being able to enter different addresses in the address field for every site on propagated entries / elements.
  • Having translation method settings (similar to built-in fields) that allow me to select to translate addresses for every site, site group, language etc., including the ability to not translate address fields (i.e. keep the current behaviour).
  • Supporting custom translation/propagation key templates similiar to Matrix fields.

Can we get a statement on whether this will be considered for the roadmap? Thanks!

Add support for Visitor Geolocation

Once we have proximity search support in place, it will become more important for the plugin to also handle visitor geolocation.

Ideally, we will rely on any geolocation tools that Mapbox may already provide. But if absolutely necessary, we will integrate with ipstack to perform the geolocation.

We have no specific ETA for this, but will report back here with any updates.

Import Addresses via Feed Me

It would be great if it were possible to import Address data via Feed Me.

Believe it or not, this would be handled entirely by Feed Me. We'll need to write a PR for compatibility.

Add support for Geocoding (Address Lookups)

I need to import some entries with an address field where the source data only includes a full address, not separate fields for street, city, zip code etc. I can do this manually through the API, but that's pretty bothersome. It would be nice if the plugin came with a utility function that performs an address lookup and returns an Address model that I can just plug into the address field.

Customizing Icon image?

Can you provide an example of customizing an marker icon image using your plugin? Thanks!

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.