+ Reply to Thread
Page 1 of 3 123 LastLast
Results 1 to 10 of 21

Thread: Leaflet GoogleMaps restriction to one country

  1. #1
    Junior Member
    Join Date
    Jan 2017
    Posts
    15

    Leaflet GoogleMaps restriction to one country

    Hey guys

    Is there any way to restrict google maps (with Leaflet) on Nova template to have autocompletion for a specific country?

    Thank you!

  2. #2
    Flynax developer Rudi's Avatar
    Join Date
    Dec 2014
    Location
    Planet Earth
    Posts
    3,138
    Hello Sam,

    Go to ftp > public_html > libs > maps > maps.js > this.createMap

    below the string input.type = 'text';

    add the following code:
    Code:
    Only registered members can view the code.
    Last edited by Rudi; May 14, 2020 at 03:37 PM.

  3. #3
    Junior Member
    Join Date
    Jan 2017
    Posts
    15
    Hi Rudi
    Thanks a lot for your quick and efficient reply.

    All the best.

  4. #4
    Hello Rudi,

    Is it working for home page search, add listing page and search on map?
    I already added the code and test on the above 3 pages but unfortunately its not working.

    Additionally, what about adding more than one country (2 or 3 countries)?

    Thanks,

  5. #5
    Flynax developer Rudi's Avatar
    Join Date
    Dec 2014
    Location
    Planet Earth
    Posts
    3,138
    Unfortunately, it doesn't allow to use 2 or more countries

  6. #6
    Hello Rudi,

    It would be highly appreciated if you could share with us how to restrict Autocompletion to one country in Header Search box in Nova Template.

    Thanks,

  7. #7
    Flynax developer Rudi's Avatar
    Join Date
    Dec 2014
    Location
    Planet Earth
    Posts
    3,138
    Hello all,

    For those who need to restrict results in city/zip code field by one country (search by distance)

    you need to select your country from default countries list:

    1. Common > Basic Settings > Search by Distance > Listing Fields Mapping > Country field > select > Save

    2. Default country > your country > Save

  8. #8
    Senior Member
    Join Date
    Mar 2016
    Posts
    181
    Hi Rudi. i did this both but still i can post a new listings and search to the other country.. please see the attached images.
    a.png
    b.png

  9. #9
    Senior Member
    Join Date
    Mar 2016
    Posts
    181
    Quote Originally Posted by Rudi View Post
    Hello all,

    For those who need to restrict results in city/zip code field by one country (search by distance)

    you need to select your country from default countries list:

    1. Common > Basic Settings > Search by Distance > Listing Fields Mapping > Country field > select > Save

    2. Default country > your country > Save
    Quote Originally Posted by Rudi View Post
    Hello Sam,

    Go to ftp > public_html > libs > maps > maps.js > this.createMap

    below the string input.type = 'text';

    add the following code:
    Code:
    Only registered members can view the code.
    Hi Rudi. i did this both but still i can post a new listings and search to the other country.. please see the attached images.

    a.png b.png

  10. #10
    Flynax developer Rudi's Avatar
    Join Date
    Dec 2014
    Location
    Planet Earth
    Posts
    3,138
    Hello,

    you should use country names without angled brackets < > as they are for comment part

+ Reply to Thread