Homepage

Smart City API, ServiceMap API, Sii-Mobility Km4City API, Online user manual



 





ServiceMap is a service and tool to pose geographic queries and see the knowledge base produced by the harvesting process based on Km4City model that includes: Street Graph from Tuscany region, Open Data from Florence Municipality, traffic monitoring, geo and weather forecast information from LAMMA, traffic sensors, services, events, parkings, real time of busses, from Florence Municipaity, etc. Some of these data provide real time information as the status of the busses on the bus lines in Florence (see Lines: 4, 17 and 6), parking sensors in Florence and Empoli, traffic sensors in Florence and Empoli, events, and the weather forecast in Tuscany. The ServiceMap accesses to an RDF Store based on Km4City ontology and model.

Service map API can be very useful for shortening the time for developers that want to realize Web or Mobile Apps, exploiting  the km4city data. As a service, different kinds of queries can be saved from the ServiceMap when you find the icon disk . They are located on Services, Weather panel, selection panel and on the general web page. Them, click them and fill the form, thus the servicemap will perform two issues (1) save the query performed in a database for your further reuse, (2) send to you an email with a set of links, which are the specific REST calls that you can use to invoke the ServiceMap API from Web and Mobile applications to obtain the service you requested.
In addition, it is possible to take the service map and put in a third party web page by using the embedded funcionality that can be activated by the icon on the lower right corner: . See an example of Embedding for the services close to DISIT Lab from this link.

Data can be provided to Km4City in any format. please send an email to km4city@disit.org
if you need to sign some agreement for providing your data to DISIT and Km4City and thus to see your data integrated in the services, please be sure that your data access and usage conditions will be satisfied/addressed. A version of the data access agreement is accessible to be used as a starting point to finalize the agreement. In alternative, we can sign your data provider agreement as well.

The call received by email will be different according to the icon you have selected, requesting: Services, Weather panel, selection panel and on the gernal web page. You can copy past these links into your application shortening the programming time, since the REST call or query are visually programmed. You can avoid learning SPARQL query language. You can develop applications that can contains queries that can be directly updated by you on ServiceMap without redeploying the application on the mobile market. To see more on this, and access to an open source example please go to the demonstrative application of FODD2015. The provided mobile app source code can be used on iOS, Android, Windows Phone, BlackBerri, etc. You can access to the RDF Store model for Km4City via the browsers http://log.disit.org .



APIs have been realized in order to cope with new possibilities and emerging needs of contextualize content, re-organizing information about services, keep real time data, and last but not least Re-use Open Data from Service Map to re-contextualize them in Mobile or Web Apps. These API are for those developers who want to exploit Open Data to create their own application.

The usage of  the Smart City API is regulated by the so-called Affiliation Agreement. The Agreement has to be signed and give you access to more technical information and allows you to use the Smart City API, test and trial them without need of understanding fully the tecnical details and reinstalling the km4City platform in your premise.
The Affiliation Agreement is available in ITALIAN and ENGLISH languages. On the contrary, if you would like to use the tools starting from  the Open Source Version, installing them and using them, you do not need to contact us. Just doing it! We are happy to help you also in that case up to a resonable amount of effort. Please note that you can access for free at our tutorial and training days.

Below, there is a description of realization, semantic and uses of the Rest APIs.
At the moment of writing three types of APIs are available for Service Map. In alternative you can direcly access to the km4city RDF store by using this link and interface for developers.

Service Info

This API provides results about a service, given the serviceUri. It is possible to choose the format of result, as json or html. The system query the km4city ontology taking information on the service, and depending on type, give results for static services, weather predictions or real time data. If the format chosen is html, the result will be displayed on ServiceMap portal as web page.

Service Search

This API provides results about a selection of categories of services chosen in a municipality or from a starting point (giving geoposition, or a ServiceUri ID). It is possible to choose the number of results required, the radius of search around the point, if the selection is a couple of latitude and longitude, and the format result. This case could be useful, as json results could be parsed in order to obtain single Service Uris to reuse as in previous case. Calling the API servicemap.disit.org/api?serviceUri=[serviceUri]. Real time pins could be actualized simply calling this uri, and showing them on the map taking the geo-located coordinates.

Loading a saved query

This API provides results based on a query saved on ServiceMap. Different kinds of queries can be saved from the ServiceMap widget when you find the icon disk . Clicking on it, and filling a form, the system will perform two issues (1) saving the query performed in a database for your further reuse, (2) send to the user a set of links via email. Among them, two links are: one for read only (rendering only if HTML, or getting the JSON of results), the second, allows you to open again the editing web page on the ServiceMap to overwrite the previously saved query performed.

Full text search

This API provides a way to search for keywords (separated by spaces) that should be present in any field associated with a service or any other thing that is geo-located. Optionally the search may be restricted to an area given the center with latitude and longitude as decimal degrees and the radius in km. The number of results maybe limited to a maximum.


Location search

This API provides a way to search for address and municipality based on the GPS position. It provides as JSON the address, number, municipality name and municipality URI. The municipality URI can be used to get the meteo information using the ServiceInfo API.
 


Embed

it is possible to take the service map and put in a third party web page by using the embedded funcionality that can be activated by the icon on the lower right corner: . See an example of Embedding for the services close to DISIT Lab from this link.
This API allows to embed a specific saved configuration into a web page using an iframe, it allows to contol the appearence of the embedded map choosing:
  • if the controls on the top left and top right should be hidden, collapsed or open,
  • if the description of the configuration provided when saving the configuration should be visible or not and
  • the map type (satellite, streets or gray scale)

 



See FODD 2015 Mobile application for Android and iOS. It is an example of Mobile Application that uses the ServiceMap API to access at km4city. The source code is also accessible.

An official Mobile App Development tool kit and source code is also accessible  from GitHub and it is subjeceted to some limitations. Sii-Mobility Dev Kit Mobile AppKm4city: Open Source version of the Sii-Mobility mobile and web app, open modular (the full version is operative and accessible on all stores as "Firenze dove cosa", or " Toscana dove cosa", you can install from http://www.km4city.org/app ).
Developed for Sii-Mobility, adopted for the training and development meeting of the 24 January 2017, and as a basis for the Hackathon of 7-8 April 2017 in Florence.

Other open source tools are described in: http://www.disit.org/6763


 

0
Il tuo voto: Nessuno


Warning: Table '.\drupal\sessions' is marked as crashed and should be repaired query: UPDATE sessions SET uid = 0, cache = 0, hostname = '192.168.0.44', session = 'hidePDA|s:1:\"0\";', timestamp = 1732389261 WHERE sid = '8017ea161f82c857d1e1f13f248468c8' in C:\Programmi\Apache Software Foundation\Apache2.2\htdocs\drupal\includes\database.mysqli.inc on line 128