cancel
Showing results for 
Search instead for 
Did you mean: 

Google API in Design Studio

Former Member
0 Kudos

Hello!

I am trainig in using Design Studio, so, I' ve created component. It works good, usual google map.
My second step was to add data to map. And it also worked, i drew polylines and polygons by loading coordinates from source.
Now,  i am trying to filter datasource by clicking on line or polygon on the map and here i am facing with the trouble. As far i understood, i need to create properties of an extension component. How does it work? Does smb have examples except SDK examples?
Thanks.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

thanks to Michael and his examples i designed component.

google.maps.event.addListener(  polylines[i],  "click",  function Clicked(event) {

       for (var j = 0; j < map.polylines.length; j++) {

            if (map.polylines[j].type == this.type) {

                 _filterParam = map.polylines[j].type;

                 that .firePropertiesChanged([ "filterParam" ]);

                 that .fireEvent("setFilters");

                 break;

            }

       }

  });

....

this.filterParam = function(value) {

  if (value === undefined) {

  return _filterParam;

  } else {

  return this;

  }

  };

...

in .ztl

String getFilterParam() {*
return this.filterParam;
*}
Former Member
0 Kudos

Hi Matt,

great that the maps integration worked for you! I am also doing some prototyping. Could you please share your eclipse project so that i can also play around a bit

Thanks & Regards,

Sunil

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Matt,

I am also on a similar kind of project can u please share your project or else just tell how you drew poly lines by taking the Co-ordinates from the source. I am finding it too difficult

Regards

Rahul

Former Member
0 Kudos

Hi

Can you share it? I'm getting crazy trying to learn how this work.

mike_howles4
Active Contributor
0 Kudos

In order of sophistication/progression:

Hope this helps.

To designate your properties for setters/getters, start at the contribution.xml file, the SDK explains the usages.  Know that in order for BIAL's .ztl syntax to acknowledge anything you write in the method implementation, this.whatever must be a property in the contribution.xml.

For datasource filtering, I believe you will have to do this by raising an event and then marshalling out the actual filtering in BIAL back to the DS object itself rather than native within your SDK component.  I have need no methods to do it otherwise, unless there is an undocumented way to do it maybe with meta_data.selection or something I've missed.

Former Member
0 Kudos

Thank you for reply.
I follow  your advices. If it is successful, I'll post my code.