My favorites | Sign in
Project Home Downloads Wiki Issues Source
READ-ONLY: This project has been archived. For more information see this post.
Search
for
DisplayYourOwnData  

#This page documents the data format that mixare understands and how to communicate it to the application.

Introduction

Mixare as a standalone application is bound to geonames.org, more specifically to the data taken from wikipedia. When you start the application a call is made to http://ws.geonames.org/findNearbyWikipediaJSON (please see here for details).

How to launch mixare with your data source

In order to show your own data through Mixare you may invoke it like this:

Intent i = new Intent();
i.setAction(Intent.ACTION_VIEW);
i.setDataAndType(Uri.parse("http://your_server/JSONEndpoint"), "application/mixare-json");
startActivity(i); 

Mixare will be invoked by the android system for every call you make to the myme type application/mixare-json

It means you can even launch mixare from the browser ;)

How to use your own datasource from within mixare

Recent versions of mixare (> v0.7) support adding and editing datasource at runtime. Just go to the datasources list (press menu -> select datasource) and add your own (press menu -> select "add new datasource").

Choose whether the POIs should be displayed as circles or as arrows, and if the format is Mixare(JSON) or OpenStreetMap (XAPI). Then go back, and the datasource will be saved.

How your data should be encoded

At the moment mixare supports two types of JSON encoding, the first being the one of geonames.org discussed earlier.

The second format is documented below:

Please note that the code below is a working example.

{
    "status": "OK",
    "num_results": 3,
    "results": [
        {
            "id": "2827",
            "lat": "46.43893",
            "lng": "11.21706",
            "elevation": "1737",
            "title": "Penegal",
            "distance": "9.756",
            "has_detail_page": "1",
            "webpage": "http%3A%2F%2Fwww.suedtirolerland.it%2Fapi%2Fmap%2FgetMarkerTplM%2F%3Fmarker_id%3D2827%26project_id%3D15%26lang_id%3D9"
        },
        {
            "id": "2821",
            "lat": "46.49396",
            "lng": "11.2088",
            "elevation": "1865",
            "title": "Gantkofel",
            "distance": "9.771",
            "has_detail_page": "0",
            "webpage": ""
        },
        {
            "id": "2829",
            "lat": "46.3591",
            "lng": "11.1921",
            "elevation": "2116",
            "title": "Roen",
            "distance": "17.545",
            "has_detail_page": "1",
            "webpage": "http%3A%2F%2Fwww.suedtirolerland.it%2Fapi%2Fmap%2FgetMarkerTplM%2F%3Fmarker_id%3D2829%26project_id%3D15%26lang_id%3D9"
        }
    ]
}
  • There must be an array whos name is "results" at the first level of the JSON object.
  • Each element of the array must contain at least lat (latitude), lng (longitude), elevation (could be "0"), title (the string that will be shown below the Marker).
  • Each element of the array could contain webpage (a link to the what is shown when the user clicks on the marker) and if it does it must contain has_detail_page with a value of 1). NB: A value of 0 for has_detail_page means that mixare will not consider clicks on that marker.
  • Each element of the array could contain distance.
  • It is strongly recommended to add a unique ID to each marker. This ID (among with the title) is used to distinguish among different markers. (in mixare version < 0.8.2 there was a bug where markers with the same title were collapsed into one even if the ID was specified)

Further details

Further details are available here: UseCasesExplanation

Comment by tsab...@gmail.com, May 23, 2010

Thanks, but this shows how to structure your output. How about, if the POIs in my database i very large and I want to generate the result that looks like this based on radius, lat and long?

Comment by fbeso...@gmail.com, Aug 19, 2010

Works great!

Comment by dje...@gmail.com, Dec 6, 2010

thanks for the remarkable work, and for making it open source. I'm playing around with maxare and would like to know the use of the "distance" field in the JSON array. I'm assumming "distance" is measured in meters, but I'm not sure what it is used for. For example, does "distance" = "10.5" means show me POIs within a 10.5 meters radius, or that the argumented reality feature works only when you're within 10.5 meters of a given landmark. Thanks for your help.

Comment by ksm...@gmail.com, Dec 7, 2010

In the section "How your data should be encoded" is this the entire format? I was wondering how to set an icon for the poi for example.

Comment by tibs...@gmail.com, Dec 22, 2010

Thanks a lot! Very good work! Continue !

Comment by tdomhan, Jan 21, 2011

@tsab...@gmail.com the following get parameters will be passed to your REST webservice: latitude, longitude=, altitude and radius

Comment by rassall....@gmail.com, Mar 3, 2011

Ok.. But my questions is where following coding should be place/under which class? like mixview.java under package.org.mixare. Please describe...

Intent i = new Intent(); i.setAction(Intent.ACTION_VIEW); i.setDataAndType(Uri.parse("http://your_server/JSONEndpoint"), "application/mixare-json"); startActivity(i);

thanks

Comment by rassall....@gmail.com, Mar 3, 2011

ok..I put these coding inside case 1: (package.org.mixture) sych that:

public boolean onOptionsItemSelected(MenuItem? item){

switch(item.getItemId()){
case 1:

Intent i = new Intent(); i.setAction(Intent.ACTION_VIEW); i.setDataAndType(Uri.parse("content://com.android.htmlfileprovider/sdcard/places.php"), "application/mixare-json"); startActivity(i); break;

}

so After open mixare, if i press datasource menu this activity start but shows "error loading places.php" on real time image. Though I already copy places.php in sdcard. So what's the problem. please help.

Comment by project member mixare.org, Mar 4, 2011
Comment by rassall....@gmail.com, Mar 9, 2011

Here I have some question about encoded data.

What is the function of distance here? like : "distance": "9.756", what does that mean?

what is the measurement value of elevation? like "elevation": "1737". I am getting location elevation information in feet from some website.

The last question is:

How I increase the default distance of mixare from 20km to 100km?

Thanks

Rassall

Comment by AtL...@gmail.com, Mar 20, 2011

You have the example of file json

you can sent to me? please.

my email address " atlazt_xi@live.com"

Comment by tsvi...@gmail.com, Apr 4, 2011

Hi, is there some way to play with adding/changing data without first having to set up a public-IP server by myself? thanks in advance, Tsvi

Comment by f.pl...@gmail.com, Apr 20, 2011

Hi! The application send to server some information about the gps position for get results near the gps position or get all records?

Comment by mohammed...@gmail.com, Jun 10, 2011

Can someone help me out with the tutorial of mixare. I'm a beginner. My platform s android. can someone guide me pls... I need the documentation too... Pls help!!

Comment by fullst...@gmail.com, Jul 26, 2011

Anybody knows how to do this (Display my own data) in iOS? Is it possible? Anybody knows any tutorial? thanks!!!!!

Comment by sara.gha...@gmail.com, Aug 1, 2011

I also need some tutorial...I wanna know how to compile the source code,,i am new with java...any help?

Comment by deepak.s...@gmail.com, Aug 3, 2011

I am a student and I used Mixare which until now seems to be really good as compare to the other platforms out there!! Can some one please let me know how to add altitude data and hows the elevation calculated for putting in the json file

Comment by leen...@gmail.com, Nov 22, 2011

There are a few thing that i do not get like where do you use this call Intent i = new Intent(); i.setAction(Intent.ACTION_VIEW); i.setDataAndType(Uri.parse("http://your_server/JSONEndpoint"), "application/mixare-json"); startActivity(i); " Is it in my own app so i can open mixare?

Comment by leen...@gmail.com, Nov 22, 2011

or do i have to modify any other things in my app...i mean like is there any type of permission that i should declare in the manifest?

Comment by ghostn...@gmail.com, Feb 1, 2012

Hola ya intente hacer lo mayor posible, tengo un ejemplo de la latitud y longitud pero no me muestra nada, el código esta en http://www.i-moves.com/gpsra/GPS.php y no se que le podrá hacer falta. "solo he modificado los puntos lat y lng" help!! --->ghostnars@gmail.com

Comment by AndrewRi...@gmail.com, Feb 19, 2012

Hi- In your demo it looks like you draw an arrow that points toward a POI and displays the distance to that point. Are there instructions anywhere on how to implement this?

Comment by epica...@gmail.com, May 12, 2012

Judging by https://github.com/mixare/mixare/blob/master/src/org/mixare/data/convert/MixareDataProcessor.java (the link to "Json.java" no longer seems to exist due to some refactoring), the "distance" parameter is superfluous and not used by mixare at all. (Was it supposed to have been a "distance from reported current lat/lng"? I'm guessing mixare calculates this itself so specifying it in the JSON output would be redundant and possibly confusing.)

Comment by android....@gmail.com, Jul 18, 2012

IS there any way to show my custom icons for each different targets ?

Comment by mdberra...@gmail.com, Aug 18, 2012

The hyperlink doesn't seem to be working in the JSON example posted above. The points show up, but it does not load the web page. Any ideas why?

Comment by mainank....@gmail.com, Aug 23, 2012

If POI's are in my database like POINT(-lat long) for locations then how to pass the database data in mixare with your output displayed over here in json structure.please suggest me some output with stepa as quick as possible?

Comment by Va...@chhadua.com, Dec 24, 2012

Hello, In the cameraview the touchesbegan event is firing if i click anywhere on screen, what should be done to make sure the event is fired and corresponding url is shown in webview when i touch a specific POI marker in camera view

Comment by lostinwa...@gmail.com, Jan 24, 2013

I just put mixare to my code (Is Library) and call the intent, I het this:

01-24 14:35:48.675: E/AndroidRuntime?(18979): android.content.ActivityNotFoundException?: No Activity found to handle Intent { act=android.intent.action.VIEW dat=http://users.***.com/pois/mix.php typ=application/mixare-json }

Is there a way to show mixare on my activity?

Comment by Jcapas...@gmail.com, Jun 14, 2013

supuestamente esto deveria funcionar :

Intent i = new Intent(); i.setAction(Intent.ACTION_VIEW); i.setDataAndType(Uri.parse("http://ws.geonames.org/findNearbyWikipediaJSON"), "application/mixare-json");
startActivity(i);

alguien podría decirme cual es el error, ya que cuando ejecuto no me sale nada en la pantalla :(

Comment by binsp...@gmail.com, Sep 23, 2013

Hi,

How can I disable the Twitter data search. Which files should I edit?

Thanks, BP

Comment by har...@mofirst.com, Oct 3, 2013

Hello , Is there any way to create and manage clusters using mixare ?

Comment by hhe...@terralogiq.com, Oct 8, 2013

Can we display all data from two datasources? if can, then how?

Comment by 123white...@gmail.com, Jun 23, 2014

Hi All,

Does any one knows where to keep below code for opening own poi.

ntent i = new Intent(); i.setAction(Intent.ACTION_VIEW); i.setDataAndType(Uri.parse("content://com.android.htmlfileprovider/sdcard/places.php"), "application/mixare-json"); startActivity(i);

please suggest.

Comment by barriety...@gmail.com, Mar 13, 2015

Totally new to this and no coding experience. Very grateful for all yer contributions.

I have mixare installed on my android. I converted a database of POI (1600) to json format exactly like it is above in the post. I hosted the json file on a server that is public. Added the URL in Mixare but it didn't load. It will load wiki OK but not my own data.

Would anyone have a clue where I've gone wrong or missed a step please?

Comment by sukirno...@gmail.com, Jun 24, 2015

hi, all i'm newbie. please help me to display my own data. how to make own data source ? step by step to make data source , so i can build my application.

Thanks

Powered by Google Project Hosting