TC5.19 - Using ServiceMap as a Tools for Developing web and mobile apps and micro applications

Primary tabs

Test Case Title

TC5.19 - Using ServiceMap as a Tools for Developing web and mobile apps and micro applications

Goal

I can use Servicemap as an acceleration tool for AreaManager, developers to:

Request to the ServiceMap tool to send to me an email with the last visual queries I performed for the above discovering on knowledge base. Thus, I can obtain the same data results of the above actions of discovering by using the links the system provide to be which are based on the Advanced Smart City API, which return JSON or HTML data results. Please note that with the Advanced Smart city API the developers can get much more details.

Get results in Json which are easily used for developing Web and Mobile applications

Get results in HTML, which are easily used for embedding results in other applications: Dashboards, web and mobile App, IOT applications, etc.

Get URLS for using the above saved visual queries directly without writing a complex REST Call. I receive a code for changing them, and a code that can be passed to friend or pasted into application making them dynamically depending on may changes. Thus, sharing with colleagues experiences and queries. This allows working on Knowledge Base at different level of complexity.

Prerequisites

Using a PC or Mobile with a web browser. Access to ServiceMap, Knowledge base with data. Several of them are available with different number of data triples: (i) Florence and whole Tuscany, (ii) Helsinki, Antwerp and Bologna, ....

The following functionalities are available only for specific Snap4city users with specific privileges.

Expected successful result

Learn how to use the ServiceMap to receive examples of the usage of: (i) the Advanced Smart City API, (ii) knowledge base, (iii) ServiceMap itself for creating links that can be used into Dashboard as views of the city, (iv) get examples about routing algorithms, (v) get example about search and discovery algorithms, etc.

Steps

 

 

Please note that some of the following links could be accessible only for registered users.

Example 1: Visually perform queries on the elements of the city and thus on the Knowledge Base and save/share the performed query and results via email with other developers.

2: Perform a query on Service map to obtain something similar:

  1. clicking in a point of the city
  2. selecting desired services
  3. selecting 100 results
  4. within a distance from the selected point of 200 mt
  5. obtaining https://servicemap.disit.org/WebAppGrafo/api/v1/?queryId=3bb85eed95823e1170a7431ab2d8c21e&format=html

 

3. Requesting sending queries and call via email, for sharing and reuse.

  • ServiceMap menu and dialog present in several points small icons as  Salva la query. If clicked after a query the tool will to send an email with the last query and all the links to be shared and to return to same identical position.
  • You can share some of the links according to your purposes.
  • Example of the email:

Thanks a lot for using Service Map by DISIT at https://servicemap.disit.org

Your query "A query" has been saved.

Description:No description provided.

You can access to the query results on Service Map by clicking on these links:

Link for read only result in format json: 'https://servicemap.disit.org/WebAppGrafo/api/v1/?queryId=3bb85eed95823e1170a7431ab2d8c21e&format=json' 

Link for read only result in html: 'https://servicemap.disit.org/WebAppGrafo/api/v1/?queryId=3bb85eed95823e1170a7431ab2d8c21e&format=html' 

Link for overwrite this query on Service Map: 'https://servicemap.disit.org/WebAppGrafo/api/?queryId=85469444354f0ed504fe05610dc3e81d' 

Link to obtain results in format json based on the coordinates of selection: 'https://servicemap.disit.org/WebAppGrafo/api/v1/?selection=43.77140371265752%3B11.254291534423828&categories=Service%3BBusStop%3BSensorSite&maxResults=0&maxDists=0.2&format=json'

Link to obtain results in format html based on the coordinates of selection:  'https://servicemap.disit.org/WebAppGrafo/api/v1/?selection=43.77140371265752%3B11.254291534423828&categories=Service%3BBusStop%3BSensorSite&maxResults=0&maxDists=0.2&format=html'

or copy paste it on your browser.

You can share the link with your friends.

Best regards

ServiceMap.disit.org team

You can contact us at info@disit.org or visit our web page at http://www.disit.org



  • Test the above links to see the differences. ..

4. Get results in Json which are easily used for developing Web and Mobile applications

  • Resulting on

{

"BusStops": {

"fullCount": 7,

"type": "FeatureCollection",

"features":[

{

"geometry":{"type": "Point","coordinates":[11.253586, 43.771355]},

"type": "Feature",

"properties": {

"name": "Piazza Della Repubblica",

"typeLabel": "BusStop",

"tipo": "fermata",

"serviceType": "TransferServiceAndRenting_BusStop",

"busLines": "C2",

"serviceUri": "http://www.disit.org/km4city/resource/Bus_ataflinea_Stop_FM1897_5",

"distance": "0.056895255586094456",

"agency": "Ataf&Linea",

"agencyUri": "http://www.disit.org/km4city/resource/Bus_ataflinea_Agency_172",

"photoThumbs": []

},

"id": 1

},

{

"geometry":{"type": "Point","coordinates":[11.254611, 43.770912]},

"type": "Feature",

"properties": {

"name": "Orsanmichele",

"typeLabel": "BusStop",

"tipo": "fermata",

"serviceType": "TransferServiceAndRenting_BusStop",

"busLines": "C2",

"serviceUri": "http://www.disit.org/km4city/resource/Bus_ataflinea_Stop_FM5126_5",

"distance": "0.060343757711833736",

"agency": "Ataf&Linea",

"agencyUri": "http://www.disit.org/km4city/resource/Bus_ataflinea_Agency_172",

"photoThumbs": []

},

"id": 2

},

..


 


Example 2: Using ServiceMap for developer with integrated tools

The proposed Snap4City solution provides a Knowledge Base grounded on Km4City ontology that is adopted to cover a number of Smart City applications, cities, regions, etc., supporting a large range of entities. Km4City ontology covers multiple domains such as: energy, culture, tourism, environment, mobility, transport, point of interest, bank, governmental, education, accommodation, food and wine, entertainment, resilience, trajectories, routing, IOT/IOE, etc.


Example 3: Km4City model and tools to manage data

  • has been tuned to provide high performance in making complex geographics queries on RDF stores: around a point, along a line, into a polyline, into an area, by text, etc.
  • keep the links to a storage with referral historical data.
    • For example, the SPARQL query

SELECT ?s { ?s a km4c:Car_park}

can be used retrieve  the list of car parks, for example using link: https://servicemap.disit.org/WebAppGrafo/sparql?query=SELECT%20?s%20{%20?s%20a%20km4c:Car_park}

  • allows to share performed queries on the ServiceMap user interface as direct SPARQL queries and/or call to Smart City API. ServiceMap can be used to visually define queries on the elements of the city and thus on the Knowledge Base and save/share the performed query and results via email with other developers. Thus, ServiceMap menu and dialog present in several points small icons as Salva la query. If clicked after a query the tool will to send an email with the last query and all the links to be shared and to return to same identical position.



Go on left and scroll to see the list of MicroServices available from Smart City API

Select one of them: get the short cut help and if you drag and drop on the editor you can get a larger help describing all the features as reported in Appendix L.


Example 4: Integrating ServiceMap into City Dashboards or third party tools

  • ServiceMap, as well as ServiceMap3D allows to be embed into web pages of the third party. For ServiceMap one can use the Embed Button on bottom right corner of Service Map with shape as: Embed Service Map



    That button can be activated only after to have saved a query by using Salva la query. ServiceMap menu and dialog present in several points Salva la query. They have to be exploited to ask at the tool to send an email with the last query and all the links to be shared and to return to same identical position. So that once saved a query you can ask to the ServiceMap to use that query for providing an embeddable version of the map. During the Embedding, you can decide to see or not the menu, the size, and other parameters. The solution provides you the HTML code for embedding the solution as an IFRAME in your HTML portal.