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, Pavan
There is a way to show or hide a shape in the shape style selector callback. Instead of changing the style returned by the selectStyle() callback you can use the second argument passed to the function and call o.visibility($.ig.Visibility.prototype.collapsed) or o.visibility($.ig.Visibility.prototype.visible) depending on whether you want to hide (collapsed) or show (visible) the shape. For example, if you look at the code of the Shape Selection sample, you can change the selectStyle() method this way:
This will make the shape that you click on to disappear.
Please, note that this functionality is likely to be changed in next releases in favor of more sophisticated and flexible shape filtering mechanism.
Cheers, Lazar
May I know is there any method like hiding which will omit those shapes from being binded to tooltip or marker template. Because based on condition i have not displayed those shapes. But when I mouse hover I can see the tool tip with the info of those shapes. Can you modify the sample and give me to completely remove those shapes so that those info is also lost.
Regards,
In this particular case it will be easier for you to change shape style and make certain shapes stand out from the others or just hide the shapes you don’t want to be displayed. Look at the Shape Selection sample for an example how to accomplish this.
Hi,
After Reading the shape file is it possible to filter the shapes based on some filter like id/Name and display only those shapes from the shape file?
For Example If I am click on Texas shape Can i Display Only counties belonging to Texas from whole counties shape file. If so Can you please post the code?
Pavan.
If your data comes from a database the way to go is to provide custom data source containing both your geographic coordinates and data related to shapes/points. To do that follow this instructions in this help topic: Configuring Geographic Shapes Series: Configuring Custom Shape Data Source.
If your geographic data is in a shapefile and your data is in a database I strongly suggest you to migrate the geographic data into the database which can be achieved with a variety of tools.