es es gl en en en en en en hu en fr fr en en en en en en ru en it en en en hy en fi hu en en en en en en en fr fr en en en en en en en en en en en cs en en gl en en en en gl en pt es gl gl en gl en
Pumpún Dixital. Marqués de Valadares, 14, 5º Ofic 10. APP DEV. Desenvolvemos aplicacións para o ollo e o oído I+D+i PLUS.
Jsonp Gis for developing Mashup Maps
Jsonp structure for building a Mashup Map.
It is necessary to do it this way because we want to load as many markers as posible in just one request, and we want to do it fast.
If we want to locate a sound in the map we only need its latitude and longitude coordinates. Besides that we also need to put the id of the article related to those coordinates, so we can get more information about it if we want.
So, this is the structure of the first jsonp:
It has only basic data related to markers and their sound:
This is how it should look like:
[ { "lat": "43.1791", "lon": "-7.45435", "id":"1891" },{ "lat": "43.3115", "lon": "-8.54908", "id":"1889" },{ "lat": "43.3112", "lon": "-8.55329", "id":"1888" } ]
[ { "lat": "43.1791", "lon": "-7.45435", "id":"1891" },{ "lat": "43.3115", "lon": "-8.54908", "id":"1889" },{ "lat": "43.3112", "lon": "-8.55329", "id":"1888" } ]
There should be possible to pass some parameters to the json in order to get different results, depending of the type of request we want to do. The pairs requests/parameters are as follows:
request: get articles from a given user
request: get articles from a given tag
request: get articles from a given search stream
request: get a limited number of articles
request: get a jsonp version of the file
The second jsonp contains all the information related to just one article, which is:
title: Title of the soundscape
description: Description of the soundscape
date: Date when the soundscape was published in standar format
permalink: The permalink to the soundscape
url_sound: The url of the sound attached to the article. It only should list one sound
url_image: The url of the image attached to the article if it exists. It only should list one image, which should be 400px width and proportional height.
user: name of the sound tracker who published the article
id: id of the article
In order to get the data, it is necessary to pass the id of the sound as a parameter. For this reason there would be an argument called id, like follows:
Like before, it is also necessary to pass a callback parameter for building the jsonp. Like for instance:
This is how it should look like:
{ "title":"Title of the article", "description":"Description of the soundscape", "date":"2011-10-09 13:33:47", "permalink":"http://urlofmywebsite/title-of-the-article", "url_sound":"http://urlofmywebsite/IMG/mp3/name-of-the-audio-file.mp3", "url_image":"http://urlofmywebsite/IMG/mp3/name-of-the-image-file.jpg", "lat":"41.956", "lon":"-8.82992", "user":"user", "id":"322" }
{ "title":"Title of the article", "description":"Description of the soundscape", "date":"2011-10-09 13:33:47", "permalink":"http://urlofmywebsite/title-of-the-article", "url_sound":"http://urlofmywebsite/IMG/mp3/name-of-the-audio-file.mp3", "url_image":"http://urlofmywebsite/IMG/mp3/name-of-the-image-file.jpg", "lat":"41.956", "lon":"-8.82992", "user":"user", "id":"322" }
We have developed a SPIP plugin that creates these two jsonp files.
Check it out here:
JSONP Gis SPIP Plugin
We are also working on doing a WordPress plugin.
This entry was written by berio, posted on 30 Xaneiro, 2012 at 22:42, filed under Sin categoría and tagged gis, jsonp. Leave a comment or view the discussion at the permalink.
Estudio de proxectos e desenvolvemento de aplicacións para o ollo e a orella.
Inventamos unha nova forma de construir a nosa historia. Ou paseamos pola terra escoitando sons e guiados polos satélites. E tamén escoitamos e programamos sons ordenados no tempo, menos libres eles pero que nos fan libres.
Servizos Pumpún Dixital. O noso Twitter. Pumpún é a versión empresarial de Escoitar.org. Si queres podes contactar con nós. Ou facernos unha proposta para desenvolver contigo un proxecto.
android, app, apr, backends, blog, canvas, CFG, cloud computing, css3, escoitar, estudio, gis, html5, jquery, jsonp, parse, plugins, spip, touch, whatif