mustardBees/cmb_field_map

Set default map location

dappi opened this issue · 9 comments

dappi commented

Would it possible to add that it's possible to set default map location my wordpress filters or something? Now the default view is UK. I looked the code and if I understood correctly now it just set in js file, right?

Great idea. I'll add this in.

I am pretty sure with the PR I suggested this would be possible.

How do I get the map to show United States and my listing become searchable?? http://6c5.69c.myftpupload.com/

Any update with this? How can I set default map location without touching plugin source code?

@eriktelepovsky In "cmb_field_map/js/script.js" you can adjust the latitude/longitude on line 15. That worked for me in order to set a default map view.

@shaynesanderson I know where it is defined. But I don't want to modify original source code. I would like to change it dynamically for example using field settings.

@eriktelepovsky Gotcha. I'd like the same, but just wanted to pass over the info that worked for me (at least for now, until something else gets put in place).

Are there any plans to update this @mustardBees? I'm based in Australia and it would be wonderful to have my clients see a map of down under by default.

Actually the other thing I noticed is that if the default is set to the UK, then suggestions also orient around that location (many suburbs here share the same names as regions in the UK, eg Brighton) and often a full address has to be typed out to properly match.