dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #18833
Re: Fwd: dhis-web-mapping
Oooops *"copy-and-paste-syndrome"* sorry about that...ignore the comment
talking about JSON.
I am using the web mapping module directly because i realize the charts /
maps generated use the id's from the web-api and i was thinking getting
those id's from the web-api and passing the id's in the URL as shown below
should start to give me some results. However i do sense that i may need to
have other *"modules / ???"* included before passing direct to the module..
Your advise again is highly appreciated!
in the above scenario the URL is pre-posted using the GET method with
options for ou & pe for example
http://aa.bb.cc.dd/api/reports/MSVvjCQU6Kr/data.pdf?pe=2012-01-01&ou=x75Yh65MaUa
When i generate a chart or map i get a full URL
for maps ===>
http://aa.bb.cc.dd/dhis-web-mapping/mapping/index.html?id=cc5D0epyFJC
hence i was thinking of simply retrieving the id's of the maps from the
web-api and passing them to the URL until before id=_posted_id
for charts ===>
http://aa.bb.cc.dd/dhis-web-visualizer/app/index.html?id=OT8OXRFEkfV
hence i was thinking of simply retrieving the id's of the charts from the
web-api and passing them to the URL until before id=_posted_id
FYI::::I am trying to make it able for the person getting the charts / maps
not only be able to view the static jpeg chart / map but also have some
interaction with the chart & map module to query and create more reports.
Otherwise, i'm able of simply displaying the jpeg chart / map. <-------> Is
this dynamism possible?
-----
kind regards
*Martin Namutso | Information System Specialist | Mob: +256 782 006 662*
*----- If you think education is expensive try ignorance! -----*
On Tue, Sep 4, 2012 at 3:26 PM, Morten Olav Hansen <mortenoh@xxxxxxxxx>wrote:
> Hi Martin
>
> Sorry, I'm a big confused. Why are you using the dhis-web-mapping module
> directly? Wouldn't it be better to use it through the web api? are you
> looking for data or images? (you mention JSON in your code..)
>
> --
> Morten
>
>
> On Tue, Sep 4, 2012 at 8:10 PM, Martin Namutso <mnamutso@xxxxxxxxx> wrote:
>
>>
>> Hey guys,
>>
>> I am enhancing and re-developing the dynamic tool that picks maps,
>> charts, reports from any DHIS2 system and i am dynamically sending the id's
>> of the maps & charts but on the page to diaplay the maps / charts, it
>> doesnt load..what could i be doing wrong??? I have shared a sample excerpt
>> of the maps page which doesn't load in my tool but as you can see in the
>> jpeg attached loads just fine in the DHIS2 system!
>>
>> <?php
>> $ch = curl_init( "
>> http://aaa.bbb.ccc.ddd/dhis-web-mapping/mapping/index.html?id=cc5D0epyFJC"
>> );
>> $options = array(
>> CURLOPT_RETURNTRANSFER => true,
>> CURLOPT_USERPWD => "username:password",
>> CURLOPT_HTTPHEADER => array('Content-type: text/html') #
>> NOT SURE THIS IS CORRECT!
>> );
>> curl_setopt_array( $ch, $options );
>>
>> $result = curl_exec($ch); // Getting jSON result string
>> print $result;
>> curl_close($ch);
>> ?>
>>
>> *FYI:::**
>> The standard reports work just fine!
>> The data-visualizer also doesn't load*!
>>
>> -----
>>
>> kind regards
>>
>> *Martin Namutso | Information System Specialist | Mob: +256 782 006 662*
>>
>> *----- If you think education is expensive try ignorance! -----*
>>
>>
>> _______________________________________________
>> Mailing list: https://launchpad.net/~dhis2-devs
>> Post to : dhis2-devs@xxxxxxxxxxxxxxxxxxx
>> Unsubscribe : https://launchpad.net/~dhis2-devs
>> More help : https://help.launchpad.net/ListHelp
>>
>>
>
Follow ups
References