Hi All,
I want to bind the shapefile. But data would be coming from database as it is dynamic instead of DBF file. Is it possible to bind shape file and dynamic data from database. If so can you post the sample?
Thanks in Advance,
Pavan
Hi,
If you set the backgroundContent to null it should hide the world map.
I am very new to JavaScript/JQuery. I am working on igMap(JavaScript/Html 5) and I want to display only USA but not world map. Please someone suggest me to achieve the same.
Thanks a Ton Lazar !!! One more small doubt. I am able to make the shapes invisible. But when I am hovering through the invisible shapes I am able to see the tooltip of those shapes. Can you tell me how to make tool tip also disabled for them.
Regards,
Pavan.
Hi, Pavan
It was just easier for me to use the context of the sample and that is why the example provided by me makes the selected shape disappear.
Your code is not working because you are using the first argument of the callback and not the second one. The callback function is passed two arguments. The first one provides the data associated to the particular shape being processed by the control. The second argument gives access to the shape series and some other state information and auxiliary methods related to the shape. One of the auxiliary methods is visibility() which allows you to configure the particular shape to be visible or not.
You need to change your code like this:
Cheers, Lazar
Hi Lazar,
My requirement is not to make the clicked shape disappear, but make few shapes which are from the shapefile to dissapear.
For Example if I click on State 'AK' then I will load all counties shapfile. Here I need to show only counties belonging to 'AK'. So I need to make all other counties shapes besides AK to be invisible.
_areaID ='AK';
shape contains a field 'BoundaryID' which can be used to filter 'AK'
function (shape) {
var pop = shape.fields.item("BoundaryID");
if (_areaID != pop) {
shape.visibility($.ig.Visibility.prototype.collapsed);
}
else
shape.visibility($.ig.Visibility.prototype.visible);
But here it is giving error saying shape has no method 'visibility'.
Can you please look into this.