Creating Custom GeoJSON maps in Design Studio 1.5 – Part 2 of 2
If you have stumbled on this post before reading Part 1, Part 1 can be found here: Creating Custom GeoJSON maps in Design Studio 1.5 – Part 1 of 2
Returning to Design Studio
We now have a GeoJSON file (named buildings_designstudio.json from Part 1) in hand, let’s put it in a Design Studio application and see what happens.
- I began with a Data Source. As this is just proof of concept work, I decided to my BYO Data Custom Datasource to shorten the prototyping in case I wanted to change values on the fly. More information on that component can be found here: Design Studio SDK (1.4) – Bring Your Own (BYO) Datasource – NOTE, the standard Data Sources work as well (BW/UNX/HANA) Below is an illustration of the data I made up in that component:
- I then went to ‘Application’ -> ‘Open Repository Folder’ and copied the buildings_designstudio.json file into the folder.
- Next, I brought in a Design Studio 1.5 Geo Map, and made the following setting to the map. Note: The ‘Custom GeoJSON File’ property is the name of the file ‘buildings_designstudio.json’.
- When looking in the canvas, I had my first unexpected behavior. The properties don’t allow me to change the default Zoom Level to anything closer to the ground, and it also doesn’t seem to auto detect the bounding box of any points or shapes. Whatever. We’ll come back to that.
- Let’s just run it and zoom in. Better. Barely. See below.
- I tried to see if this could be overcome via BIAL scripting, so I put in this command on Application Startup:
- Running again, I’m able to zoom in tighter, but it has wiped out the tiles. Also, as soon as I attempt to zoom in or out, it throws me back to the illustration above with the tiny buildings.
So lessons learned?
- You CAN make your own GeoJSON files and they technically WILL WORK in the standard maps in Design Studio 1.5
- Zooming is however limited in scale, and in design time options.
- You can address zooming somewhat for runtime by scripting using centerMap in BIAL, however the behavior can be unexpected and erractic.
- This approach should work just fine when your features are not buildings, probably something like city blocks or tracts of land will come out nicely. I will post a follow-up with this case in a follow-up blog, while using these same steps.
While I really wish the delivered Geo Map component could replace the need for SDK extensions, it seems like the SCN Community Maps still have some gas left in the tank 🙂 Below, using the same data source, I was able to use the same GeoJSON pasted into Map Data, and assign a Choropleth Measure and Bubble Measure, and end up with decent results:
I think it looks decent and will auto zoom to the GeoJSON features for you, however as you can see, there are no nice map tile backdrops. But in a pinch, maybe it is enough for now.
I’m hoping maybe in a minor 1.5 patch or 1.6 we can have more control over Geo Map zooming. Perhaps a trip over to Idea Place is due.
- GeoJSON is a great option for enhancing any geovisualizations in Design Studio Geo Maps, along with SDK extensions that support it.
- Aside from zooming, I think there are plenty of really great uses for the Geo Maps component without relying on SCN or partner extensions.
- GIS is a huge subject matter area that opens up all types of new use cases, some of which have a valid role within a BI Application in the future.