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.

  1. 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:

    /wp-content/uploads/2015/06/part2_map1_722571.png

  2. I then went to ‘Application’ -> ‘Open Repository Folder’ and copied the buildings_designstudio.json file into the folder.

    /wp-content/uploads/2015/06/15map17_722618.png

  3. 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’.

    /wp-content/uploads/2015/06/part2_map2_722572.png

  4. 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.

    /wp-content/uploads/2015/06/part2_map3_722619.png

  5. Let’s just run it and zoom in.  Better.  Barely.  See below.

    /wp-content/uploads/2015/06/part2_map4_722620.png

  6. I tried to see if this could be overcome via BIAL scripting, so I put in this command on Application Startup:
    GEO_MAP_1.centerMap("LAYER_1");
  7. 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.

    /wp-content/uploads/2015/06/part2_map5_722566.png

So lessons learned?

    1. You CAN make your own GeoJSON files and they technically WILL WORK in the standard maps in Design Studio 1.5
    2. Zooming is however limited in scale, and in design time options.
    3. You can address zooming somewhat for runtime by scripting using centerMap in BIAL, however the behavior can be unexpected and erractic.
    4. 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.

Potential Workaround

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:

/wp-content/uploads/2015/06/part2_map6_722633.png

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.


Final Thoughts

  • 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.
To report this post you need to login first.

11 Comments

You must be Logged on to comment or reply to a post.

  1. Dirk Mayrock

    Hi Michael,

    thanks for sharing Part 2. I also recognized the limited zooming. My feeling was that this is somehow limited to the used Basemap. Maybe there are other Basemap services that allows more detailed zooming. But dont know.

    Maybe there is someone in the community that has more GIS knowledge as we both have 😀 and can help out here.

    Dirk

    (0) 
    1. Anthony Patterson

      Hi Dirk,

      Unfortunately it’s a limitation of the component not the basemap. For the use cases we had in mind when designing it, the level of detail Michael describes wasn’t required.

      Anthony

      (0) 
      1. Dirk Mayrock

        Hi Anthony,

        thanks for clarification even if its not the answer I was hoping to get 😆

        So hopefully it will come in upcoming SPS or Releases…

        Cheers

        Dirk

        (0) 
        1. Etienne Guilhaume

          I’d consider that a bug to be honest. The centerMap() method should provide the same level of maximum zoom as a manual one. We will try to fix that in a service pack.

          (0) 
          1. Mike Howles Post author

            Until there’s a proper fix, this might be an exciting SDK update for some for this blogged use case.  It’s coming in a new map component I’ve been playing with over holidays.  It has multiple base maps support, support for map center and zoom level (and retains the state) as well as custom geojson creation all within DS.  (Pic below):

            Coming soon.

            /wp-content/uploads/2015/12/campus_860131.png

            (0) 
  2. Ingo Hilgefort

    Hello Jean Christian,

    I am sure people would highly appreciate if you stop posting your question to every single blog / forum and repeat your question several times in just a few minutes.

    posting the question once in the forum should be good enough.

    In case you need urgent help you can always reach out to SAP’s support team.

    regards

    Ingo Hilgefort, Visual BI

    (0) 
  3. Adinarayanan MN

    Hi Mike Howles and others,


    I am working on Design studio 1.5 and new to Geo Map component. I am trying to use a custom geojson file where in our customer’s region and the respective coordinates are present in the form of multipoint polygon. My data is of structure: “region_id” and the corresponding “performance_value”. I need to colour the regions in the map as follows:


    regions with low value in red ranging to regions with high value in green


    I used the custom geojson in the place of basemap url in the geo map component and added a layer where i mapped the region_id as mapping attribute and the data source from where the data is coming is also mapped in this layer (a shape layer). While executing this application am getting the error “locale nl not supported”. The custom geojson is placed in the BW system’s MIME repository.


    Your help is very much appreciated.


    Thanks and Regards,

    M.N.Adinarayanan

    (0) 
  4. Geovanni Monge

    Hi Mike,

    Question, in step 2 “I then went to ‘Application’ -> ‘Open Repository Folder‘ and copied the buildings_designstudio.json file into the folder.

    For some odd reason I do not see this option under my Application menu. Could it be hidden under some other menu? Or is due to the Design studio version that I am using?

    (0) 
    1. Etienne Guilhaume

      Hello Geovanni,

      Is it possible that you are running Design Studio on BIP? The “Open Repository Folder” menu item is only available in local mode. To upload your GeoJSON file on BIP, you should go directly in the geo map additional properties and click on the “…” icon to upload your file on BIP, or point to an existing one.

      Cheers,

      Etienne

      (0) 
      1. Geovanni Monge

        Thanks for the reply Etienne,

        In fact, yes, I am using DS on BIP. See I am new to DS. So once I click on the box with “…” next to Custom GeoJSON File, I will then select my geoJson file from there, but for whatever reason I am still not able to  view the states in the in the GEO MAP component.

        Regards,

        Geovanni M

        (0) 
        1. Etienne Guilhaume

          Hello Geovanni,

          Could this be due to configuring the GeoJSON mapping? You need to make sure that the following 2 properties are set properly:

          – GeoJSON Mapping Property: name of the property in the GeoJSON file to use to map the geojson file to your data source

          – GeoJSON Mapping Type: whether you want to map using the dimension key or text

          Let me know if these properties are clear to you or not. I can go in a bit more details if necessary.

          Cheers,

          Etienne

          (0) 

Leave a Reply