How to change text and set address on map ( Add-listing )

This topic contains 23 replies, has 4 voices, and was last updated by  Ding Hua 7 years, 4 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #323508

    Ding Hua
    Expired Member
    Post count: 152

    Hi ,

    Refer arrow in the attached file ,

    How can I change the text for
    a) Region –> to Division (or any other text)
    b) City –> to Township (or any other text)
    d) Text in region selection drop down , Select state –> to select Division (or any other text)
    d) Text in City selection drop down , Select City –> to select Township (or any other text)

    And “Set Address on Map” button:
    When user click , I don’t want to use value from fields like address , region and city to search location to get lat and log.
    In Singapore , there is no region and city. Only use country Singapore and postal code is enough in google map. We normally use Country name and postal code to search location on google map. How can I change to search using only country name and postal code only when user click “Set Address on Map”(ignore the reset of the field like address,region and city).

    Rgds,
    YC

    #323776

    Kor
    Moderator
    Post count: 16516

    Hi Ding Hua,

    Have you tried that translation method? It should work, though, and here’s the link https://wpgeodirectory.com/docs/translate-core/ . Let us know how it goes.

    #324017

    Ding Hua
    Expired Member
    Post count: 152

    Hi Kor Chung,

    No. This method works only for other , refer the arrow key in attached file for working one.
    It does’t work for Address and map.

    I have two questions from above post. Pls answer both questions. Thx.

    Question 1)

    How can I change the text for
    a) Region –> to Division (or any other text)
    b) City –> to Township (or any other text)
    d) Text in region selection drop down , Select state –> to select Division (or any other text)
    d) Text in City selection drop down , Select City –> to select Township (or any other text)

    Question 2)

    And “Set Address on Map” button:
    When user click , I don’t want to use value from fields like address , region and city to search location to get lat and log.
    In Singapore , there is no region and city. Only use country Singapore and postal code is enough in google map. We normally use Country name and postal code to search location on google map. How can I change to search using only country name and postal code only when user click “Set Address on Map”(ignore the reset of the field like address,region and city).

    rgds,
    YC

    #324351

    Paolo
    Site Admin
    Post count: 31206

    HI,

    1) Kor already replied this question. All default text strings, can only be changed via translation files: https://wpgeodirectory.com/docs/category/translation/

    Some will be in the core plugin, some in the location manager. It’s not hard to figure out where one would be.

    2) that is not possible, the system requires those fields even for a single city.

    Thanks

    #324500

    Ding Hua
    Expired Member
    Post count: 152

    Hi,

    1st question is working fine after changing location add on .po file.

    For 2nd question , refer attached file google-map-api-query-with-postal-code-n-country.png , the google map api allows to query only with postal code and country and the information return is correct and accurate, refer to the attached file long-lat-on-google-map.png for verification.

    It means google map api allows to query with postal code and country only.
    You can try it here:
    http://maps.googleapis.com/maps/api/geocode/json?address=732895,Singapore

    Any idea where can I change to make this work ?

    or any option that I can configure for this to work ?

    Rgds,
    YC

    #324789

    Paolo
    Site Admin
    Post count: 31206

    Hi,

    removing region and country would require a very extensive customization. I asked to the developers to let us know if they have a better idea.

    They’ll let us know,

    Thanks

    #325026

    Ding Hua
    Expired Member
    Post count: 152

    Hi ,

    Not remove country.

    Currently using below to query geocode
    1.Address
    2.Country
    3.Region(state)
    4.City
    5.Postal code

    For Singapore , it can be queried by using only two , country & postal code.
    As shown here:
    http://maps.googleapis.com/maps/api/geocode/json?address=732895,Singapore

    And ignore city,state(Region),address as there is no city and state in Singapore.

    Rgds,
    YC

    #325398

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    Hi YC,

    I see it return Singapore for the city also, maybe we need to add region as Singapore too?
    Would this solve the problem (i am not sure what the problem is you are having)

    Stiofan

    #325503

    Ding Hua
    Expired Member
    Post count: 152

    Hi Stiofan,

    My end users do not want to select/key in many things to get geocode lon/lat by pressing “Set Address on Map” button.

    They just want to select country “Singapore” and key in postal code and press “Set Address on Map” button to get geocode lon/lat.

    It means , when user press “Set Address on Map” button , geodirectry just use the value for country and postal code(ignore address,region(state),city) to query google map geocode , like below.

    google api query allows it
    Look at the last two parameters for api input.
    732895 is postal code
    Singapore is country

    http://maps.googleapis.com/maps/api/geocode/json?address=732895,Singapore

    Thus,

    Any idea where can I change to make this work ?

    or any option that I can configure for this to work ?

    Rgds,
    YC

    #325580

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    Hi YC,

    It would still leave the region empty which would cause problems. Is your site limited to just Singapore?

    Stiofan

    #325590

    Ding Hua
    Expired Member
    Post count: 152
    This reply has been marked as private.
    #325681

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    Do you even need the location manager at all then?
    If you do for some reason have u tried setting the country, region and city to the default only? If you can provide wp-admin i can set it up for you like that.

    Stiofan

    #326078

    Ding Hua
    Expired Member
    Post count: 152
    This reply has been marked as private.
    #326807

    Ding Hua
    Expired Member
    Post count: 152

    Hi Stiofan,

    I have tried setting the country, region and city to the default.
    Still doesn’t work. Seem like API is not querying with postal code.
    Thus , API cannot reply correctly some of the address in Singapore.

    As I mentioned before , In Singapore , query with postal code and country is most accurate.

    And I cannot use country, region and city to the default as I still need to use
    [gd_location_switcher] to show user post on different location.

    Thus I still need to use multilocation.
    And just need option for map api to query with postal code and country and don’t update region and city data rerun from api.

    Just need to update long/lat.

    Rgds,
    YC

    #326936

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    Hi YC,

    Have you tried, GD>Multilocations>ADD LISTING FORM SETTINGS>Disable set address on map from changing address fields

    Stiofan

Viewing 15 posts - 1 through 15 (of 24 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket