Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8499

How to upload and what should be the contents of GeoJSON file?

$
0
0

Chandrashekhar Mahajan -    

I want to implement the analytic map functionality which is a part of sap visual business .. i'm not able to bind the GeoJson data to the respective location

As per the development kit sample code it is as given below-

// create some dummy data

var oData =

{

regionProperties :

[

{ "code": "EU", "color": "rgba(184,225,245,1.0)", "tooltip":"Europe\r\n\r\nPopulation: 743 Mio" },

{ "code": "NA", "color": "rgba(5,71,102,1.0)", },

{ "code": "OC", "color": "rgba(0,125,192,1.0)" }

]

};

 

// create model and set the data

var oModel = new sap.ui.model.json.JSONModel();

oModel.setData( oData );

 

// set the geojson location to some data

jQuery.sap.require( "sap.ui.vbm.AnalyticMap");

sap.ui.vbm.AnalyticMap.GeoJSONURL = "media/analyticmap/continent.json"; //Wanted to know like what should be the content of this json file??

 

// create analytic map and bind to model

var oVBI = new sap.ui.vbm.AnalyticMap('vbi',

{

width : "100%",

height: 512,

plugin: false,

regions : {

path : "/regionProperties",

template: new sap.ui.vbm.Region( { code: "{code}", color: '{color}', tooltip: '{tooltip}', click: onRegionClick, contextMenu: onRegionContextMenu } )

},

 

regionClick : onRegionClick,

regionContextMenu : onRegionContextMenu

});

 

oVBI.setModel( oModel );

oVBI.placeAt("sample1");

 

 

                                                                      Thank You


Viewing all articles
Browse latest Browse all 8499

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>