Developer forum

Forum » Rapido » Maps App not rendering country

Maps App not rendering country

Mafalda Correa
Mafalda Correa
Reply

Hi,

I'm using the Maps app to render a group of Dealers in Google maps, but I noticed that the country is not being rendered. Even though I set up the Shipping / Billing Country for my dealers, the GetLoop("Locations") is returning an empty string on location.GetString("Country");

See the repro here: https://www.screencast.com/t/b7H1413Sy

I'm in DW version 9.9.5

Thanks


Replies

 
Nicolai Pedersen
Reply

That is because the user actually have 2 country fields. The 'old' one which a just a text field, and the 'new' one which is a country selector that uses a ISO 2 letter codes.

The template renders the 'old' text field and not the country code field. So you have to change the template to take that scenario into consideration.

BR Nicolai

 
Mafalda Correa
Mafalda Correa
Reply

But the GetLoop("Locations") doesn't return any other Country field. So there's no way I can get the value in the template. And it seems to me like the old field is not available anymore, so I can't use that either.

 
Nicolai Pedersen
Reply

Uh - good point.

Made a change to give you new options, TFS#89126:

Users has either country field or country select box.

When the select box is used, there is no country name rendered in the location loop in the template of the maps template.

I have changed the feature so that if a country code is chosen, the country name is found using RegionInfo in .NET and the country name from that is returned. The name is in its own language, i.e. "Deutchland", "Danmark", "Sverige" etc.

There is also a new tag in the locations loop "CountryEnglish" which will return the name in english.

There is also a new tag in the locatioins loop "CountryCode" which will return the 2 letter iso code (if chosen)

I have comitted the change and it will be available with the next version of the maps package.

BR Nicolai

 
Mafalda Correa
Mafalda Correa
Reply

That sounds perfect, thank you!

 

You must be logged in to post in the forum