on 09-15-2015 11:43 AM
Hi,
I've tried to use a GeoJSON file in Design Studio 1.5 SP1 to display the states as shapes in the US.
The GeoJSON file contained the Feature "LSAD" with the abbreviated State as the property, e.g.
"LSAD": "AZ" for Arizona,
"LSAD": "AK" for Alaska,
etc.
My DS application used a BEx Query with the InfoObject 0REGION. This is compounded with the InfoObject 0COUNTRY.
This didn't work.
I then created a new InfoProvider with the non-compounded InfoObject REGION.
This worked.
My question is how must I write the property in the GeoJSON file correctly for the compounded InfoObject 0REGION?
e.g. for Arizona
"LSAD": "USAZ" or
"LSAD": "US/AZ" or
"LSAD": "US\AZ" or
"LSAD": "AZUS"
or something else?
Please tell me if you know.
Martin
Hello Martin,
my guess would be there is a " " (space) between the key values but the best way is to take a BEx query with the compounded values and use a crosstab and then just use a .getSelectedvalue on the crosstab for the onSelect and get the compounded key value
regards
Ingo Hilgefort, Visual BI
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ingo,
Thanks for your answer. Your guess is as always very good, as it should be for someone who has almost got to gold level!
I checked the value in the crosstab and there is indeed a space between country and state,
e.g. "US AZ" for Arizona.
If a may, a related question - I had tried to get the connection via text, i.e. "Arizona". But it seems that that only works if I have coded Arizona in the InfoObject key. That is to say, DS always connects the chosen GeoJSON value with the InfoObject key value which in my case is "AZ" and not with the InfoObject text, in my case "Arizona".
My question:
Is this really so? This would mean that the GeoMap property "Text" is a bit misleading.
Or have I just configured something wrong.
Regards,
Martin
Hi Ingo,
the text is also used in the GeoJSON file. That is not the problem.
The problem is the BEx query.
Using your idea of getSelectedvalue on the crosstab for the onSelect, I always get the key value.
It does not matter if I change 0REGION from the BEx query in the DS DataSource initial view to text, text and key or just key.
I suspect that text in the GeoJSON file will only match up if 0REGION's key value contains the text, e.g. 0REGIONS key value would have to be Arizona and not AZ.
What is your experience?
Regards,
Martin
Hi Ingo,
I changed the initial view to text (e.g. Arizona)
This was meant to correspond to the text in the GeoJSON file (also Arizona).
This didn't work.
I changed the intial view to key and then to key and text.
That didn't work either.
On the other hand, when I changed GeoJSON to LSAD (= AZ) it worked and it didn't matter how I set up the initial view (text = Arizona or key = AZ or both = AZ Arizona)
I'm not quite sure what LSAD above means, but it contains the same abbreviation in GeoJSON that is used as a key in 0REGION in the BEx query displayed in the initial view.
Regards,
Martin
Hello Martin,
in the GeoMap component you uploaded the GeoJSON file I assume.
Then in the properties you have
- GeoJSON Mapping Property: This is where you select the attribute that you want to map to the data in the Data Source
- GeoJSON Mapping Type : Here you pick Text or Key.
So based on your description you would set the GeoJSON Mapping Property to LSAD and you would set the GeoJSON Mapping Type to the "Key".
You mentioned that your GeoJSON file only has Key values - correct me if I misunderstood that.
Also make sure that in the initial view there is only one dimension / characteristic in the Rows !
regards
Ingo
Sorry Ingo,
my last post was a bit confused.
GeoJSON includes several possibilities, including these two:
1) LSAD This contains the key, e.g. AZ
2) NAME This contains the text, e.g. Arizona
I tried 4 different combinations -
1)
NAME from GeoJSON Arizona
Text from the initial view Arizona
--> Didn't work.
2)
NAME from GeoJSON Arizona
Key from the initial view AZ
--> Didn't work.
3)
LSAD from GeoJSON AZ
Key from the initial view AZ
--> Worked
4)
LSAD from GeoJSON AZ
Text from the initial view Arizona
--> Worked
I assume that Design Studio always uses the key from geo-relevant characteristic in the BEx Query, in my case 0REGION.
The display mode in the initial view, key, text or both is irrelevant.
What is your opinion?
Regards,
Martin
Hi Martin,
thats now what I experienced so far.
when you tried your scenario (1) - was in the initial view the Key and Text shown ? Could you try with only the TExt being shown in the initial view ?
The fact that combination (4) worked is kind of "strange".
I have used the Text before and matched it to a "name" attribute.
regards
Ingo
User | Count |
---|---|
76 | |
9 | |
8 | |
7 | |
6 | |
5 | |
5 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.