23
9/4/2015 Design Studio Innovation Series Topic 6: Geo ... | SCN http://scn.sap.com/community/businessobjectsdesignstudio/blog/2015/06/01/designstudioinnovationseriestopic6geomapspartifeaturereview 1/23 Getting Started Newsletters Store Products Services & Support About SCN Downloads Industries Training & Education Partnership Developer Center Lines of Business University Alliances Events & Webinars Innovation Log On Join Us Hi, Guest Search the Community Activity Communications Actions Browse SAP BusinessObjects Design Studio 0 Tweet 15 Part II can be found here: Topic 7: Geo Maps Part II Zoom, Zoom, Zoom! Introduction One of the exciting and long awaited new features introduced in Design Studio 1.5 is the Geo Map component. After having tried it out I thought I'd share my experiences. I must say that for a first version, I think it's pretty impressive in terms of capabilities and also quite easy to use. It has certainly exceeded the standard mapping capabilities in Xcelsius. Scenario I'll be describing the Geo Map features in the context of a BW BEx example related to US airline ontime performance data including airport locations and statistics such as % Weather Delay and % Delayed Flights. Configuration The Geo Map component allows interactive maps to be included in an application, consisting of shapes and markers overlaid onto a base map. I'll describe the process in terms of my scenario. After designing the application, my workspace looks like this: Standard Properties The most important standard property is the Basemap URL. The Geo Map component defaults to the open source OpenStreetMap tile provider as shown below. You are free to use your own tile provider but I found OpenStreetMap quite sufficient for my purposes. Other properties include the basemap credit and legend visibility. You can also trigger interactivity based on the "On Select" event of the map. Design Studio Innovation Series Topic 6: Geo Maps Part I Feature Review Posted by Mustafa Bensan in SAP BusinessObjects Design Studio on Jun 1, 2015 6:26:20 PM Share 28 1 Like

Design Studio Innovation Series - Topic 6_ Geo

Embed Size (px)

DESCRIPTION

Design Studio Innovation Series - Topic 6_ Geo ..

Citation preview

Page 1: Design Studio Innovation Series - Topic 6_ Geo

9/4/2015 Design Studio Innovation Series Topic 6: Geo ... | SCN

http://scn.sap.com/community/businessobjectsdesignstudio/blog/2015/06/01/designstudioinnovationseriestopic6geomapspartifeaturereview 1/23

Getting Started Newsletters Store

Products Services & Support About SCN Downloads

Industries Training & Education Partnership Developer Center

Lines of Business University Alliances Events & Webinars Innovation

Log On Join UsHi, Guest Search the Community

Activity Communications Actions

Browse

SAP BusinessObjects Design Studio

0 Tweet 15

Part II can be found here: Topic 7: Geo Maps Part II Zoom, Zoom, Zoom!

Introduction One of the exciting and long awaited new features introduced in Design Studio 1.5 is the Geo Map component. Afterhaving tried it out I thought I'd share my experiences. I must say that for a first version, I think it's pretty impressive interms of capabilities and also quite easy to use. It has certainly exceeded the standard mapping capabilities inXcelsius. Scenario I'll be describing the Geo Map features in the context of a BW BEx example related to US airline ontime performancedata including airport locations and statistics such as % Weather Delay and % Delayed Flights. Configuration The Geo Map component allows interactive maps to be included in an application, consisting of shapes and markersoverlaid onto a base map. I'll describe the process in terms of my scenario. After designing the application, myworkspace looks like this:

Standard Properties

The most important standard property is the Basemap URL. The Geo Map component defaults to the opensource OpenStreetMap tile provider as shown below. You are free to use your own tile provider but I foundOpenStreetMap quite sufficient for my purposes. Other properties include the basemap credit and legendvisibility. You can also trigger interactivity based on the "On Select" event of the map.

Design Studio Innovation Series Topic 6: Geo MapsPart I Feature ReviewPosted by Mustafa Bensan in SAP BusinessObjects Design Studio on Jun 1, 2015 6:26:20 PM

Share 28 1Like

Page 2: Design Studio Innovation Series - Topic 6_ Geo

9/4/2015 Design Studio Innovation Series Topic 6: Geo ... | SCN

http://scn.sap.com/community/businessobjectsdesignstudio/blog/2015/06/01/designstudioinnovationseriestopic6geomapspartifeaturereview 2/23

Additional Properties:

This is the fun part! In the additional properties you define the layers for your map. There are 3 types of GeoLayers:

Shapes Layers for overlaying shapes based on GeoJSON filesPoints Layers for overlaying markers for specific geo locationsCharts Layers for overlaying bubbles based on a specific measure

Each layer must be assigned a data source. Data sources can be reused across layers. In my example, Imanaged with just two data sources as shown below:

The first data source includes a geo dimension with latitude and longitude attributes as well as measures. Itis used in Points layers and Charts layers.

Each data source must contain only one geo dimension in the rows section of the Initial View. For Points andCharts layers, the geo dimension should ideally include the standard BW latitude and longitude attributes,otherwise they need to be defined as measures in the columns section of the Initial View. In my example, Ipreferred to use the standard BW attributes as shown below:

Page 3: Design Studio Innovation Series - Topic 6_ Geo

9/4/2015 Design Studio Innovation Series Topic 6: Geo ... | SCN

http://scn.sap.com/community/businessobjectsdesignstudio/blog/2015/06/01/designstudioinnovationseriestopic6geomapspartifeaturereview 3/23

Page 4: Design Studio Innovation Series - Topic 6_ Geo

9/4/2015 Design Studio Innovation Series Topic 6: Geo ... | SCN

http://scn.sap.com/community/businessobjectsdesignstudio/blog/2015/06/01/designstudioinnovationseriestopic6geomapspartifeaturereview 4/23

The second data source is used for Shapes layers to assign US FIPS (Federal Information ProcessingStandards) state codes to the corresponding polygon representing the state in the GeoJSON file. Longitudeand latitude attributes are not required.

To illustrate the different use cases for the Geo Map features I have defined 5 different layers as follows:

1. US Airport Location Marker

This layer is of type Marker. Therefore it requires latitude and longitude geo dimension attributes. You willnotice that there is no field to explicitly reference the geo dimension here because only one can be defined inthe data source Initial View. For this example, the geo dimension on data source DS_1 is the Origin Airportwhich will be plotted with a marker based on the longitude and latitude coordinates. Finally, a marker colourmust be selected. 2. US Airport Location Bubble

This layer is of type Chart. At the moment, the only geo chart type available is a bubble chart. The size of abubble is proportional to the value of the selected measure, which in this case is the % Weather Delay. The

Page 5: Design Studio Innovation Series - Topic 6_ Geo

9/4/2015 Design Studio Innovation Series Topic 6: Geo ... | SCN

http://scn.sap.com/community/businessobjectsdesignstudio/blog/2015/06/01/designstudioinnovationseriestopic6geomapspartifeaturereview 5/23

bubbles are centred on the geo location of the airport based on the assigned latitude and longitude in datasource DS_1. In this case a GeoJSON file is not specified because we just want to display bubbles at thegeo locations without the need for superimposing them on shapes. Therefore the Mapping Property andMapping Type are not relevant either.

3. US State Bubble

This layer is also of type Chart, like the previous one. An important difference however is that latitude andlongitude is not referenced. Instead, a custom GeoJSON file is specified to define shapes (polygons) thatcorrespond to US states. Each state polygon in the GeoJSON file includes properties, one of which can belinked via the Mapping Property and Mapping Type to support interactivity via the "On Select" event of theGeo Map component. The dimension linked to the state shape is automatically derived from data sourceDS_2 since it includes only one geo dimension.

It is worth noting here that when the latitude and longitude are not specified, the bubble will be centred insideits corresponding shape, in this case the state. 4. US State Choropleth

This layer is of type Shape. In the example, the specified GeoJSON file defines the US states (as before)with the corresponding data association via the Mapping Property and Mapping Type. Additionally, in thiscase, the Start Color and End Color properties have been defined so that the resulting output is in the form ofa choropleth map, with the colour gradient being based on the chosen measure, % Weather Delay from datasource DS_2.

5. US State Analytic

Page 6: Design Studio Innovation Series - Topic 6_ Geo

9/4/2015 Design Studio Innovation Series Topic 6: Geo ... | SCN

http://scn.sap.com/community/businessobjectsdesignstudio/blog/2015/06/01/designstudioinnovationseriestopic6geomapspartifeaturereview 6/23

This layer is the same as the previous one but a single colour is specified instead so that the output is in theform of an "analytic map" (like those in Xcelsius). In this case it may be appropriate to hide the legend. Since there is no colour gradient, the selected measure is arbitrary.

Interactivity via Scripting

To demonstrate the different types of effects that can be achieved, I have included a configuration sidebarthat allows the visibility of the basemap to be toggled and different combinations of layers to be selected, asshown below:

The "On Select" event script of the basemap visibility radio group has been defined as follows:

Here the setMapUrl() method shows the basemap by setting the map URL to the default URL (in this caseOpenStreetMap), or hides the basemap by specifying a null URL.

The "On Select" event script of the layer selection checkbox group has been defined as follows to control thedisplay of the layers:

Furthermore, to demonstrate an example of drilling down to additional information based on selection of an

01. var baseMapVisibility = me.getSelectedValue(); 02. if (baseMapVisibility == "showBasemap") 03. GEO_MAP.setMapUrl(basemapURL); 04. 05. else GEO_MAP.setMapUrl("");

01. var selectedMapLayers = me.getSelectedValues(); 02. var allMapLayers = mapLayers.split(","); // Convert map layer string to array 03. // Hide all map layers 04. allMapLayers.forEach(function(mapLayerID, index) 05. GEO_MAP.setLayerVisible(mapLayerID, false); 06. ); 07. // Display selected map layers 08. selectedMapLayers.forEach(function(mapLayerID, index) 09. GEO_MAP.setLayerVisible(mapLayerID, true); 10. );

Page 7: Design Studio Innovation Series - Topic 6_ Geo

9/4/2015 Design Studio Innovation Series Topic 6: Geo ... | SCN

http://scn.sap.com/community/businessobjectsdesignstudio/blog/2015/06/01/designstudioinnovationseriestopic6geomapspartifeaturereview 7/23

area of the map, the script below displays a chart ranking the airports within the chosen state:

It is recommended to execute the getSelectedLayer() and getSelectedMember() methods together for bestresults. In the above example, the member returned is the state key based on the layer's GeoJSON MappingProperty.

Custom GeoJSON

GeoJSON shape files are usually used to overlay regions. They are readily available on the internet. For thisexample, I obtained a US State file from the link GeoJSON and KML Data for the United States(gz_2010_us_040_00_500k.json). Alternatively, they can be created from other sources such as NaturalEarth using tools such as the following:

MyGeoDatamapshapergeojson.io

Like CSS files, GeoJSON files must be placed in the application repository folder to be accessible whendeveloping in local mode.

Screenshots

The screenshots below illustrated the capabilities of the new Geo Map component:

The default tile provider OpenStreetMap is quite suitable for many use cases in my opinion.

01. var selectedLayerID = GEO_MAP.getSelectedLayer(); 02. var selectedState= GEO_MAP.getSelectedMember("ZOSTFIPS"); 03. var selectedStateKey = selectedState.internalKey; 04. var selectedStateText = selectedState.text; 05. if (selectedLayerID == "US_STATE_BUBBLE" || selectedLayerID =="US_STATE_ANALYTIC" || selectedLayerID == 06. DS_1.setFilter("ZOSTFIPS", selectedStateKey); 07. DS_1.sortByMeasure("006EIC2OSTY2YB663A5R7IE8Y", false); 08. FIORIAPPHEADER_PAGE_2.setTitle(selectedStateText + " % Delayed Flights ranked by Airport"); 09. PAGEBOOK_GEOMAP.setSelectedPageByName("CHART_PAGE"); 10.

Page 8: Design Studio Innovation Series - Topic 6_ Geo

9/4/2015 Design Studio Innovation Series Topic 6: Geo ... | SCN

http://scn.sap.com/community/businessobjectsdesignstudio/blog/2015/06/01/designstudioinnovationseriestopic6geomapspartifeaturereview 8/23

Page 9: Design Studio Innovation Series - Topic 6_ Geo

9/4/2015 Design Studio Innovation Series Topic 6: Geo ... | SCN

http://scn.sap.com/community/businessobjectsdesignstudio/blog/2015/06/01/designstudioinnovationseriestopic6geomapspartifeaturereview 9/23

Page 10: Design Studio Innovation Series - Topic 6_ Geo

9/4/2015 Design Studio Innovation Series Topic 6: Geo ... | SCN

http://scn.sap.com/community/businessobjectsdesignstudio/blog/2015/06/01/designstudioinnovationseriestopic6geomapspartifeaturereview 10/23

Page 12: Design Studio Innovation Series - Topic 6_ Geo

9/4/2015 Design Studio Innovation Series Topic 6: Geo ... | SCN

http://scn.sap.com/community/businessobjectsdesignstudio/blog/2015/06/01/designstudioinnovationseriestopic6geomapspartifeaturereview 12/23

Page 13: Design Studio Innovation Series - Topic 6_ Geo

9/4/2015 Design Studio Innovation Series Topic 6: Geo ... | SCN

http://scn.sap.com/community/businessobjectsdesignstudio/blog/2015/06/01/designstudioinnovationseriestopic6geomapspartifeaturereview 13/23

Average User Rating

(12 ratings)

0 Tweet 15

Conclusion Hopefully this blog has provided a useful overview of the main features available with the new Geo Map component. Ithink it's a comprehensive addition to Design Studio that can meet the requirements of many typical use cases. It'scertainly a very solid debut for geo mapping. I plan to follow this up with Part II, which will explore the use of layers for implementing drilldown functionality throughdifferent levels of maps. In the meantime, I'd be interested in your thoughts about the Geo Map component and examples of use cases you'dlike to address for your own business requirements. Comments and questions are most welcome. Part II: Topic 7: Geo Maps Part II Zoom, Zoom, Zoom! Blog Series Index: Design Studio Innovation Series Welcome

5038 Views Categories: SDK, Scripting, Styling, BW, HANATags: xcelsius, dashboards, dashboard, dashboard_design, sapzen, business_objects_design_studio, design_studio,

businessobjects_design_studio, designstudio, dashboard_design_xcelsius

Share 28 1Like

51 Comments

Like (1)

Mike Howles Jun 1, 2015 7:14 PM

Great overview showcasing all of the mapping capabilities in 1.5, Mustafa. I must agree that SAPexceeded my expectations when it came to mapping. Not only are they supporting openended tileproviders (OSM, Mapbox, Stamen, Mapbox, MapQuest, etc) but also multiple layers based onGeoJSON, they've covered probably nearly everything of what most customers would be looking forfor a baseline map. My one wishlist item is for latitude and longitude to be supportable as a Dimension rather than aMeasure/Attribute. I'm puzzled why it was excluded but nevertheless, this is quite minor. Also, to reinforce map tile variety, below is an example showing 2 MapBox tile set, and a Stamen tileset on the bottom: EDIT: Looks like it won't let me upload pics in comments for some reason...

Brent Kastor Jun 1, 2015 8:31 PM

Looks great! I am new to SAP, but have 17 years experience in GIS using primarily Esri products. Doyou know of any Esri integrations with SAP Design Studio? Thanks!

Page 14: Design Studio Innovation Series - Topic 6_ Geo

9/4/2015 Design Studio Innovation Series Topic 6: Geo ... | SCN

http://scn.sap.com/community/businessobjectsdesignstudio/blog/2015/06/01/designstudioinnovationseriestopic6geomapspartifeaturereview 14/23

Like (0)

Also, we have multiple types of shapes we would like to display within the map points, lines, andpolygons do you know if these are supported I see points and polygons being supported? I wouldsuppose with the support of GeoJSON, the GeoMap would be able to display line type data as well?

Like (1)

Mike Howles Jun 1, 2015 8:41 PM (in response to Brent Kastor)

Brent, ESRI support seems limited to their slippy map tiles. Shapes are limited to datadriven plot markers, bubbles, and GeoJSON shape overlays thatare shaded based on a linear color scale based on Measure values. I've not seen an ability to plot lines such as between Departure and Arrival destinations, etc.

Like (1)

Vincent Dechandon Jun 1, 2015 11:29 PM (in response to Brent Kastor)

Hi Brent. The company I work for (I can't put the name right there for SAP SCN rules reasons, click onmy profile to see the company name) has already released a Location Analytics Componentthat fit your needs. It's compatible with Esri Server/Online v10.0 or more, as well asGeoJSON and TopoJSON. Still on my profile, you'll be able to find a complete blog I made about the extension I'mtalking about. If you are interested, feel free to send me a private message and I will be able to provide youthe link to download the extension. Br,Vincent

Like (0)

Mustafa Bensan Jun 6, 2015 3:31 AM (in response to Brent Kastor)

Hi Brent, Apart from the ESRI tile provider that Mike mentioned, I don't believe there is a DesignStudio addon like there is for the Dashboards (Xcelsius) product. Also, as Mike has pointed out, I would expect any kind of shapes in GeoJSON format to besupported but there isn't a mechanism to dynamically plot shapes other than locationmarkers. In my example data set, I have Departure and Arrival location information. I wouldthink that it should be technically feasible to introduce a new layer type, "line", whichaccepted two geo dimensions instead of one for such a purpose. Perhaps we may see thisas an enhancement in a future version of the Geo Map component. Alternatively you couldconsider evaluating a more specialised 3rdparty maps addon for Design Studio. You mentioned that you're new to SAP. I'd be interested to know about the potential usecases for geo maps that you have in mind for Design Studio if you're able to share them. Regards, Mustafa.

Like (1)

Vincent Dechandon Jun 1, 2015 11:29 PM

Great introduction to this new feature, it gives a good overview of what can or cannot be done. Br,Vincent

Like (1)

Deepu Sasidharan Jun 2, 2015 1:05 AM

Hi Mustafa, Great intro and well thought thru blog as usual! Looking forward to the next part. Deepu

Jeroen van der A Jun 2, 2015 9:26 AM

Thanks Mustafa, that is a good read. Jeroen

Page 15: Design Studio Innovation Series - Topic 6_ Geo

9/4/2015 Design Studio Innovation Series Topic 6: Geo ... | SCN

http://scn.sap.com/community/businessobjectsdesignstudio/blog/2015/06/01/designstudioinnovationseriestopic6geomapspartifeaturereview 15/23

Like (1)

Like (0)

Mustafa Bensan Jun 8, 2015 4:19 AM (in response to Jeroen van der A)

Thanks for your feedback, Jeroen.

If you are able to share, I'd be interested to know what type of demand and usecases for geo maps you are seeing from customers and your opinion of the extent towhich such use cases could be met with the standard functionality of the new GeoMap component in Design Studio? Also, what enhancements to this component doyou think are needed to fully address geo mapping requirements from customers?

Regards,

Mustafa.

Like (0)

Roland Weygold Jun 5, 2015 11:13 AM

Hi Mustafa,Thanks for the clear introduction! One question: is it possible to determine the value ranges and associated colors in the choropleth maps, rather thanhaving a default scale from lowest to highest value? Thanks,Roland

Like (0)

Mustafa Bensan Jun 5, 2015 11:35 AM (in response to Roland Weygold)

Hi Roland, Glad it was helpful. Unfortunately, it doesn't look like there's any option to define customvalue ranges for the colours in a choropleth map. If so, I would have expected to see this inthe Layer definition of the Additional Properties Sheet but it's not there. You could suggest itin the Design Studio Idea Place. Regards, Mustafa.

Like (0)

Roland Weygold Jun 6, 2015 12:01 AM (in response to Mustafa Bensan)

Hi Mustafa,Thanks for swift reply. I will check out the custom component provided by Ryanbefore adding to the "Idea Place".

Like (0)

Mustafa Bensan Jun 6, 2015 1:47 AM (in response to Roland Weygold)

Hi Roland, Yes, definitely check out Mike Howles' Choropleth Map componentas mentioned by Ryan, which had slipped my mind. It has quitecomprehensive configuration options so is likely to address yourrequirement for custom colours. Regards, Mustafa.

Like (1)

Ryan W Jun 5, 2015 11:13 PM (in response to Roland Weygold)

Is this helpful?

http://scn.sap.com/community/businessobjectsdesignstudio/blog/2015/03/20/sapdesignstudiosdkchoroplethmapsrefinedpart3

Like (0)

Roland Weygold Jun 6, 2015 12:02 AM (in response to Ryan W)

Hi Ryan,This appears to be just what I was looking for :)will check it out! Thanks, Roland

Page 16: Design Studio Innovation Series - Topic 6_ Geo

9/4/2015 Design Studio Innovation Series Topic 6: Geo ... | SCN

http://scn.sap.com/community/businessobjectsdesignstudio/blog/2015/06/01/designstudioinnovationseriestopic6geomapspartifeaturereview 16/23

Like (0)

Alexander Croll Jun 9, 2015 12:45 AM

Hi Mustafa, thanks for your blog, helped me out a great deal of understanding this new component! I haven't worked much with maps yet, but I would like to have a basemap of Europe which I can thenoverlay with a corresponding geojson (choropleth) of Europe's countries. I have the geojson file, but no idea how to get the map to only show Europe upon startup. > Can I set the zoom somehow?> How / where exactly can I get a basemap url to replace the default one? (I have searched for thisbut couldn't figure it out by myself so far) Thanks a lot! Cheers Alex

Like (0)

Mustafa Bensan Jun 9, 2015 2:26 AM (in response to Alexander Croll)

Hi Alex, I'm glad you found the blog helpful. You ask a very good question and it's one I've been looking into for my followup blog post. One approach would be to dynamically set the parameters of the default basemap to zoomto the US. A custom basemap URL can be set with the setMapURL() method. The default OpenStreetMap basemap URL for the Geo Map component is as follows:

http://otile1.mqcdn.com/tiles/1.0.0/map/LOD/X/Y.png We need to derive the basemap tile name at the appropriate zoom level (for the US in yourcase). However, it turns out it's not as simple as just setting the zoom level, latitude andlongitude. There's an interesting mathematical calculation to determine the tile name. An alternative could be to find a USonly basemap provider (as you've suggested). Oneexample I've come across is The National Map from the USGS (US Geological Survey). If you can wait a little I plan to post a blog on the subject with my findings this week. Regards, Mustafa.

Like (0)

Anthony Patterson Jun 9, 2015 6:06 PM (in response to Alexander Croll)

Hi Alex, Have you tried using the centerMap() scripting function? This will zoom in on an area in themap. E.g. if you have only European countries in LAYER_1, you could call this method onstartup and it would zoom in on Europe. Anthony

Like (1)

Mustafa Bensan Jun 9, 2015 7:11 PM (in response to Anthony Patterson)

Hi Anthony, I have experimented with the centerMap() method but it doesn't seem to optimisethe zoom level to the shape layer and also issues intermittent errors such as: "The map URL could not be resolved; check validity of URLhttp://otile1.mqcdn.com/tiles/1.0.0/map/2/4/1.png"

Regards,

Mustafa.

Anthony Patterson Jun 10, 2015 10:24 AM (in response to Mustafa Bensan)

Hi Mustafa, Centring on the whole US may be difficult because the Aleutian Islandsextend onto the righthand side of the map. Europe should work better,especially if you can find shapes that exclude overseas possessions.

Page 17: Design Studio Innovation Series - Topic 6_ Geo

9/4/2015 Design Studio Innovation Series Topic 6: Geo ... | SCN

http://scn.sap.com/community/businessobjectsdesignstudio/blog/2015/06/01/designstudioinnovationseriestopic6geomapspartifeaturereview 17/23

Like (0)

It should be ok with US States too, if you exclude Alaska. Anthony

Like (0)

Alexander Croll Jun 10, 2015 7:04 PM (in response to AnthonyPatterson)

Hi Anthony, Mustafa, thanks for your replies! I did try the centerMap() method and it actually does the trick, butnot as easily as one may wish. It seems to center the map basedon the given values from my Layer. So for example if I havevalues for France, Spain and Germany, the map will be centeredbased on these countries and not entire Europe (scandinaviancountries are only halfvisible, EasternEuropean countries alsolessvisible). Excluding overseasterritories does also help! However, the method causes error (same as the one Mustafadescribed) when trying to zoom into countries that are close tothe edge of the basemap. This happens particularly for NorthAmerica, because Alaska and Canada are so close to the edgeof the map. South America, Africa or Asia (not sure about NZ / OZ) worksfine, because you have the 'buffer' of the Antarctis... Do you guys know of a basemap that has larger edges (i.e.North America not so close to the edge of the basemap)? Thanks! Alex

Like (0)

Mustafa Bensan Jun 10, 2015 8:26 PM (in response toAlexander Croll)

Hi Alex, If my understanding of world basemaps is correct, Isuspect that all tile providers will have the same/similaredges simply because the spacing is based on theactual geographic data. Regarding the intermittent zooming error withcenterMap() (which also occurs with normal mapnavigation when not using centerMap() by the way), I'minclined to think that this is a bug with the Geo Mapcomponent itself. As I understand it, the GeoMapcomponent populates the three basemap URLparamaters dynamically for centerMap() and normalzooming. It seems to me that the error occurs becausethe Geo Map component does not always correctlycalculate the parameters. Regards, Mustafa.

Like (1)

Mike Howles Jun 11, 2015 12:17 AM (in response toMustafa Bensan)

It's almost like as a workaround, you create alayer that has on GeoJSON feature that is asingle simple box that represents the boundsof your intended zoomed viewport, and usethat as the layer to do your centerMapzooming, and reserve the other layer(s) forthe actual visualizations. Maybe it wouldwork, I'll have to try it later.

Mustafa Bensan Jun 11, 2015 5:26 AM(in response to Mike Howles)

That's a good suggestion whichcertainly sounds logical. Otherwiseyou'd have to try to get fancy bydynamically setting the threeparameters of the basemap URL,which I've been meaning toexperiment with but I'm sure that will

Page 18: Design Studio Innovation Series - Topic 6_ Geo

9/4/2015 Design Studio Innovation Series Topic 6: Geo ... | SCN

http://scn.sap.com/community/businessobjectsdesignstudio/blog/2015/06/01/designstudioinnovationseriestopic6geomapspartifeaturereview 18/23

Like (0)

have its own challenges as well.

Like (0)

Anthony Patterson Jun 11, 2015 10:50AM (in response to Mike Howles)

If you want to make a layer invisible,but still use it with centerMap(), thetrick would be to toggle the visibilityusing CSS.

Like (0)

Anthony Patterson Jun 11, 2015 9:36 AM (inresponse to Mustafa Bensan)

Hi Mustafa, You're correct. There is a bug with certain tilecalculations which will fixed in SP1. Anthony

Like (0)

Mustafa Bensan Jun 11, 2015 10:17 AM(in response to Anthony Patterson)

Hi Anthony, Thanks for confirming that. It's goodto know the issue will be addressed

in SP1 . Mustafa.

Like (0)

Jeroen van der A Jun 11, 2015 11:01 AM

another thought:since HANA SP9 has all the GEO functionalities. Will we be able to directly connect to HANA viewsthat hold the GEO data? Jeroen

Like (0)

Anthony Patterson Jun 11, 2015 11:13 AM (in response to Jeroen van der A)

With some limitations. E.g. I've been able to create a spatial join in a calculation view andsee the results in Design Studio, but returning the special spatial datatypes (e.g.ST_Geometry) doesn't work well.

Like (1)

Ryan Goodman Jun 12, 2015 10:32 AM

Awesome article Mustafa. Have you tried throwing a bunch of data points at it to see what kind ofperformance can be squeezed out in browser and mobile?

Like (0)

Mustafa Bensan Jun 12, 2015 3:39 PM (in response to Ryan Goodman)

Thanks Ryan. In my example I have 300 data points which performs well on the desktopbrowser. I haven't tried on mobile yet but will do so.

Like (1)

Giulia Sogaro Jul 1, 2015 2:15 PM

Great Article, thank you for sharing. I noticed a different behaviour in different layer type.The null values are not display in the first layer type, but in the third type the geomap show all thevalues. What do you think about it?Have a nice day.

Like (0)

Mustafa Bensan Jul 1, 2015 2:56 PM (in response to Giulia Sogaro)

Thanks Giulia. Can you post screenshots of the Additional Properties sheet showing thetwo layers you have configured so I can provide feedback accordingly?

Page 19: Design Studio Innovation Series - Topic 6_ Geo

9/4/2015 Design Studio Innovation Series Topic 6: Geo ... | SCN

http://scn.sap.com/community/businessobjectsdesignstudio/blog/2015/06/01/designstudioinnovationseriestopic6geomapspartifeaturereview 19/23

Like (0)

Giulia Sogaro Jul 1, 2015 3:45 PM (in response to Mustafa Bensan)

This is my situation: SoldItaly 120France Null I see Italy and France in the geo map using this layer

I see only Italy using this layer

Thank you

Like (0)

Mustafa Bensan Jul 1, 2015 4:18 PM (in response to Giulia Sogaro)

So if I understand correctly:

In that case, I agree that the behaviour seems to be inconsistent betweenthe layers. I would say it's either a bug or the layers have been designeddifferently for some reason.

the data source is the same for both layersthere is a dimension for country which maps to the iso_a2 geoJSONproperty in both casesthe LAYER_BUBBLE layer displays both countries but no bubble forFrancethe LAYER_COUNTRY layer displays Italy only

Bruno Candido Jul 13, 2015 3:25 PM

Is it possible using set Brazil map ? Because I'm trying to include Brazilian States ( region) , But Itwas not possible using default map, the default map just setted for Countries and US States , Doesanyone knows how can I do that ? Thanks In advanced

Page 20: Design Studio Innovation Series - Topic 6_ Geo

9/4/2015 Design Studio Innovation Series Topic 6: Geo ... | SCN

http://scn.sap.com/community/businessobjectsdesignstudio/blog/2015/06/01/designstudioinnovationseriestopic6geomapspartifeaturereview 20/23

Like (0)

Like (1)

Giulia Sogaro Jul 13, 2015 5:24 PM (in response to Bruno Candido)

Hi, From the third layer: An important difference however is that latitude and longitude is not referenced. Instead, a custom GeoJSON file is specified to define shapes (polygons) thatcorrespond to US states. Each state polygon in the GeoJSON file includesproperties, one of which can be linked via the Mapping Property and Mapping Type tosupport interactivity via the "On Select" event of the Geo Map component. Thedimension linked to the state shape is automatically derived from data source DS_2since it includes only one geo dimension.

So, you should add a costum GeoJSON file to define shapes that correspond toBrazilian Region.

Like (0)

Bruno Candido Jul 14, 2015 1:33 PM (in response to Giulia Sogaro)

Hi Giulia,Thank you for your answer.

Like (1)

Mustafa Bensan Jul 13, 2015 6:28 PM (in response to Bruno Candido)

Hi Bruno, You can usually find publicly available geo map files on the internet. You could trydownloading the Brazil map geoJSON file from the Highmaps Collection, as one reference. Regards, Mustafa.

Like (0)

Bruno Candido Jul 14, 2015 1:29 PM (in response to Mustafa Bensan)

Yes I have tried this Brazil map geoJson from this site, but does not works yet,maybe I am doing something wrong. I appreciate your help, thank you.

Laurens Geraedts Jul 20, 2015 11:53 AM (in response to Bruno Candido)

Hi Bruno, I have similar experiences. What works for me is using the following links:

Next simplify and export the file in geojson format. Hope it helps.

http://www.divagis.org/gdata (Country = Brazil/Administrative Area)http://www.mapshaper.org (upload .shp and .dbf files)

Page 21: Design Studio Innovation Series - Topic 6_ Geo

9/4/2015 Design Studio Innovation Series Topic 6: Geo ... | SCN

http://scn.sap.com/community/businessobjectsdesignstudio/blog/2015/06/01/designstudioinnovationseriestopic6geomapspartifeaturereview 21/23

Like (1)

Regards,Laurens.

Like (0)

Mustafa Bensan Jul 23, 2015 10:35 AM (in response to LaurensGeraedts)

Hi Laurens, This site is a very useful suggestion. When attempting toimport the .dbf files to mapshaper I encounter the followingerror message: "Unable to autodetect the DBF file's textencoding. You can specify an encoding using the"encoding" import option. Run the "encodings"command to view supported encodings." Do you know which encoding should be specified whenuploading the .dbf files? Thanks, Mustafa.

Like (1)

Laurens Geraedts Jul 23, 2015 8:33 PM (in response toMustafa Bensan)

Hi Mustafa, As far as I experienced it works for some, but not for all.I haven't found out the rootcause of that. One way oflooking at the separate .dbffile is by using Excel.Wouldn't be surprised if it has something to withcountries/languages involved. Best regards,Laurens.

Like (2)

Anthony Patterson Jul 14, 2015 2:28 PM (in response to Bruno Candido)

Hi Bruno, The problem has to do with the coordinate reference system. TheHighmaps data is using units of metres, whereas the GeoMap componentexpects degrees of latitude and longitude. Anthony

Like (0)

Mustafa Bensan Jul 23, 2015 10:44 AM (in response to AnthonyPatterson)

Hi Anthony, Thanks for clarifying the cause of the issue. So does this meanthat the Highmaps GeoJSON files apply a nonstandardcoordinate reference system (in metres) compared to agenerally accepted reference based on latitude and longitude? Regards, Mustafa.

Anthony Patterson Jul 23, 2015 11:00 AM (in response toMustafa Bensan)

Hi Mustafa, I wouldn't say nonstandard; the reference system usedby Highmaps is perfectly valid, and described withstandard metadata within the file. It's just that DesignStudio made the decision initially to only support a verycommonlyused reference system based on latitudeand longitude. There are many tools available which should be ableto convert these files. I often use a commandline toolcalled 'ogr2ogr', but QGIS or ArcGIS should work too.

Page 22: Design Studio Innovation Series - Topic 6_ Geo

9/4/2015 Design Studio Innovation Series Topic 6: Geo ... | SCN

http://scn.sap.com/community/businessobjectsdesignstudio/blog/2015/06/01/designstudioinnovationseriestopic6geomapspartifeaturereview 22/23

Like (1)

Anthony

Like (0)

Mustafa Bensan Jul 23, 2015 11:50 AM (inresponse to Anthony Patterson)

Hi Anthony, Thanks for the clarification and conversiontool suggestions. That helps. Regards, Mustafa.

Like (0)

Sravan Aravelly Jul 21, 2015 9:24 PM

Hi Mustafa, Does Design Studio installation come with any default GeoJSON file ( eg: for countries etc. ) If yes, isthere a specific location other than the below location where I need to look for : C:\Users\<username>\Analysisworkspace\com.sap.ip.bi.zen\repository\<my_app>\shapes.geojson. Moreover, I am trying to implement the scenario at GLOBAL LEVEL [ 11 COUNTRIES ( including USA) and Various States & Cities within a Country ( Ex: USA ). We do not have County Level Data. JustCountry Level, State Level & City Level ]. Do you recommend using a single GEOJSON file for all countries or multiple GEOJSON files ? Moreover, Is there a specific website that I can use to download the latitudes & longitudes informationfor cities across the world. Thanks,Sravan.

Like (0)

Mustafa Bensan Jul 23, 2015 10:59 AM (in response to Sravan Aravelly)

Hi Sravan, Yes, the Design Studio Geo Map component does include a builtin default GeoJSON filerepresenting a map of world countries. I don't think it includes the states and cities though. It is "activated" if you simply leave the GeoJSON file property in the layer definition blank. Alternatively, to obtain state and city level information you could look at LaurensGeraedts suggestion above. You can try to assemble a single GeoJSON file first, as per the example I've given in myfollowup Part II blog. If you find that it's too large even after simplifying with mapshaper,you can then consider separate layers/files for each country. Regards, Mustafa.

Like (1)

Harald Wetzel Aug 4, 2015 3:08 PM

Hi Mustafa, great article, thx! I've tried to rebuild the described scenario, but I'm already struggling with the basemap URL, doesn'tseem to exist anymore. Is there any alternative URL? Regards,Harald

Like (0)

Mustafa Bensan Aug 4, 2015 4:47 PM (in response to Harald Wetzel)

Thanks Harald. Which basemap URL are your referring to? The default ofhttp://otile1.mqcdn.com/tiles/1.0.0/map/LOD/X/Y.png ? This still works for me. Could there be a firewall issue with your network that is preventingconnection to the basemap URL? Regards, Mustafa.

Page 23: Design Studio Innovation Series - Topic 6_ Geo

9/4/2015 Design Studio Innovation Series Topic 6: Geo ... | SCN

http://scn.sap.com/community/businessobjectsdesignstudio/blog/2015/06/01/designstudioinnovationseriestopic6geomapspartifeaturereview 23/23

Follow SCNSite Index Contact Us SAP Help PortalPrivacy Terms of Use Legal Disclosure Copyright