# How to render particular features of interest in WMS Server edition

**URL:** <https://community.thinkgeo.com/t/how-to-render-particular-features-of-interest-in-wms-server-edition/7377>\
**Category:** WMS Server\
**Created:** [March 12, 2013, 8:48am UTC](https://community.thinkgeo.com/t/how-to-render-particular-features-of-interest-in-wms-server-edition/7377 "2013-03-12T08:48:32Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rumeysa](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/r/7993a0/32.png) [@Rumeysa](https://community.thinkgeo.com/u/Rumeysa)\
**Post date:** [March 12, 2013, 8:48am UTC](https://community.thinkgeo.com/t/how-to-render-particular-features-of-interest-in-wms-server-edition/7377/1 "2013-03-12T08:48:32Z")

</div>

&nbsp;&nbsp;Hi,

&nbsp;  
I&nbsp;am&nbsp;working&nbsp;with&nbsp;wms&nbsp;server&nbsp;edition&nbsp;and&nbsp;developing&nbsp;the&nbsp;code&nbsp;on&nbsp;visual&nbsp;studio&nbsp;2010&nbsp;edition&nbsp;to&nbsp;make&nbsp;use&nbsp;of&nbsp;my&nbsp;wms&nbsp;on&nbsp;a&nbsp;web&nbsp;client&nbsp;application.  
&nbsp;  
I&nbsp;have&nbsp;some&nbsp;shapefiles&nbsp;like&nbsp;city&nbsp;buildings&nbsp;and&nbsp;rivers&nbsp;and&nbsp;I&nbsp;would&nbsp;like&nbsp;to&nbsp;render&nbsp;these&nbsp;features&nbsp;of&nbsp;interest&nbsp;on&nbsp;the&nbsp;map&nbsp;as&nbsp;an&nbsp;overlay.&nbsp;Then&nbsp;I&nbsp;need&nbsp;to&nbsp;add&nbsp;these&nbsp;as&nbsp;an&nbsp;overlay&nbsp;with&nbsp;openlayers&nbsp;onto&nbsp;my&nbsp;basemap.&nbsp;There&nbsp;are&nbsp;plenty&nbsp;of&nbsp;examples&nbsp;on&nbsp;doing&nbsp;this&nbsp;with&nbsp;openlayers.&nbsp;But,&nbsp;my&nbsp;question&nbsp;is&nbsp;that&nbsp;how&nbsp;I&nbsp;can&nbsp;create&nbsp;a&nbsp;map&nbsp;that&nbsp;only&nbsp;shows&nbsp;city&nbsp;building&nbsp;and&nbsp;sets&nbsp;the&nbsp;background&nbsp;as&nbsp;transparent.&nbsp;Since&nbsp;I&nbsp;am&nbsp;only&nbsp;interested&nbsp;in&nbsp;showing&nbsp;the&nbsp;city&nbsp;buildings&nbsp;rather&nbsp;than&nbsp;the&nbsp;whole&nbsp;world&nbsp;map.&nbsp;The&nbsp;image&nbsp;below&nbsp;is&nbsp;an&nbsp;example&nbsp;that&nbsp;I&nbsp;found&nbsp;from&nbsp;other&nbsp;brand&nbsp;map&nbsp;serving&nbsp;engine.&nbsp;So,&nbsp;I&nbsp;would&nbsp;like&nbsp;to&nbsp;get&nbsp;the&nbsp;same&nbsp;output&nbsp;as&nbsp;below&nbsp;where&nbsp;it&nbsp;shows&nbsp;only&nbsp;the&nbsp;buildings.&nbsp;

 ![](https://community.thinkgeo.com/uploads/default/original/2X/8/8335be88f531d9f9fef26da13d44614e07697ec3.PNG)  
&nbsp;  
Thanks&nbsp;in&nbsp;advance,  
Rumeysa&nbsp;

---

<div class="post-metadata">

**Author:** ![Edgar](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/e/b487fb/32.png) [@Edgar](https://community.thinkgeo.com/u/Edgar)\
**Post date:** [March 13, 2013, 1:29am UTC](https://community.thinkgeo.com/t/how-to-render-particular-features-of-interest-in-wms-server-edition/7377/2 "2013-03-13T01:29:01Z")

</div>

Hi&nbsp;Rumeysa,  
&nbsp;  
Attached&nbsp;is&nbsp;the&nbsp;sample&nbsp;code,&nbsp;Please&nbsp;try&nbsp;it.  
&nbsp;  
Hope&nbsp;it&nbsp;helps  
&nbsp;  
Edgar  
&nbsp;  
  
[Post11103Sample.txt](https://community.thinkgeo.com/uploads/default/original/2X/e/e4b3d37d6ce54760cd2bf892585d2a761529d6a9.txt) (1.57 KB)

---

<div class="post-metadata">

**Author:** ![Rumeysa](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/r/7993a0/32.png) [@Rumeysa](https://community.thinkgeo.com/u/Rumeysa)\
**Post date:** [March 15, 2013, 4:44am UTC](https://community.thinkgeo.com/t/how-to-render-particular-features-of-interest-in-wms-server-edition/7377/3 "2013-03-15T04:44:44Z")

</div>

Hi,&nbsp;  
&nbsp;Thanks&nbsp;for&nbsp;the&nbsp;code&nbsp;Edgar.&nbsp;&nbsp;  
&nbsp;The&nbsp;code&nbsp;you&nbsp;have&nbsp;provided&nbsp;adjusts&nbsp;the&nbsp;bounding&nbsp;box&nbsp;according&nbsp;to&nbsp;the&nbsp;building&nbsp;shapefile.&nbsp;As&nbsp;a&nbsp;matter&nbsp;of&nbsp;fact,&nbsp;this&nbsp;was&nbsp;not&nbsp;my&nbsp;question.&nbsp;My&nbsp;question&nbsp;is&nbsp;that&nbsp;I&nbsp;want&nbsp;to&nbsp;be&nbsp;able&nbsp;to&nbsp;display&nbsp;only&nbsp;the&nbsp;buildings&nbsp;on&nbsp;the&nbsp;map&nbsp;with&nbsp;a&nbsp;trasnparent&nbsp;backgorund&nbsp;as&nbsp;shown&nbsp;in&nbsp;the&nbsp;screenshot&nbsp;that&nbsp;I&nbsp;have&nbsp;attached&nbsp;earlier.&nbsp;After&nbsp;getting&nbsp;the&nbsp;desired&nbsp;output,&nbsp;then&nbsp;I&nbsp;will&nbsp;use&nbsp;this&nbsp;map&nbsp;with&nbsp;openlayers&nbsp;to&nbsp;print&nbsp;it&nbsp;as&nbsp;an&nbsp;overlay&nbsp;on&nbsp;top&nbsp;of&nbsp;the&nbsp;thinkgeo&nbsp;map&nbsp;I&nbsp;created&nbsp;before.&nbsp;&nbsp;&nbsp;  
&nbsp;&nbsp;  
&nbsp;Thanks&nbsp;in&nbsp;advance,&nbsp;  
&nbsp;Rumeysa

---

<div class="post-metadata">

**Author:** ![Johnny](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/johnny/32/19044_2.png) [@Johnny](https://community.thinkgeo.com/u/Johnny)\
**Post date:** [March 18, 2013, 4:51am UTC](https://community.thinkgeo.com/t/how-to-render-particular-features-of-interest-in-wms-server-edition/7377/4 "2013-03-18T04:51:11Z")

</div>

&nbsp;Hi&nbsp;Rumeyasa,

If&nbsp;there&nbsp;is&nbsp;a&nbsp;special&nbsp;column&nbsp;to&nbsp;identify&nbsp;the&nbsp;corresponding&nbsp;building&nbsp;features,&nbsp;for&nbsp;instance,&nbsp;all&nbsp;the&nbsp;building&nbsp;features&nbsp;has&nbsp;a&nbsp;column&nbsp;“COLOR\_MAP”&nbsp;which&nbsp;shares&nbsp;a&nbsp;unique&nbsp;value&nbsp;“7”,&nbsp;we&nbsp;can&nbsp;just&nbsp;show&nbsp;buildings&nbsp;using&nbsp;the&nbsp;code&nbsp;below:

&nbsp;  
`                ShapeFileFeatureLayer worldLayer = new ShapeFileFeatureLayer("");                ValueStyle valueStyle = new ValueStyle();                valueStyle.ColumnName = "COLOR_MAP";                valueStyle.ValueItems.Add(new ValueItem("7", AreaStyles.CreateSimpleAreaStyle(GeoColor.SimpleColors.Red)));                worldLayer.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20;                worldLayer.ZoomLevelSet.ZoomLevel01.CustomStyles.Add(valueStyle);                LayerOverlay staticOverlay = new LayerOverlay();                staticOverlay.IsBaseOverlay = false;                staticOverlay.Layers.Add(worldLayer);`

Thanks,

Johnny&nbsp;&nbsp;&nbsp;&nbsp;

---

<div class="post-metadata">

**Author:** ![Rumeysa](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/r/7993a0/32.png) [@Rumeysa](https://community.thinkgeo.com/u/Rumeysa)\
**Post date:** [March 18, 2013, 8:14am UTC](https://community.thinkgeo.com/t/how-to-render-particular-features-of-interest-in-wms-server-edition/7377/5 "2013-03-18T08:14:41Z")

</div>

Thanks&nbsp;for&nbsp;the&nbsp;code,&nbsp;&nbsp;Johnny.&nbsp;  
  
I&nbsp;would&nbsp;like&nbsp;to&nbsp;set&nbsp;the&nbsp;background&nbsp;as&nbsp;transparent&nbsp;and&nbsp;only&nbsp;publish&nbsp;the&nbsp;building&nbsp;or&nbsp;city&nbsp;shapefile&nbsp;on&nbsp;a&nbsp;map&nbsp;that&nbsp;has&nbsp;an&nbsp;invisible&nbsp;background.&nbsp;Later,&nbsp;I&nbsp;will&nbsp;use&nbsp;this&nbsp;output&nbsp;to&nbsp;stack&nbsp;it&nbsp;onto&nbsp;thinkgeo&nbsp;map(this&nbsp;is&nbsp;the&nbsp;basemap)&nbsp;with&nbsp;openlayers.&nbsp;I&nbsp;know&nbsp;the&nbsp;deployment&nbsp;part-The&nbsp;code&nbsp;that&nbsp;involves&nbsp;adding&nbsp;wms&nbsp;in&nbsp;openlayers&nbsp;as&nbsp;an&nbsp;overlay.&nbsp;But&nbsp;my&nbsp;question&nbsp;is&nbsp;how&nbsp;to&nbsp;display&nbsp;the&nbsp;buildings&nbsp;like&nbsp;in&nbsp;the&nbsp;screenshot&nbsp;I&nbsp;have&nbsp;provided&nbsp;earlier&nbsp;where&nbsp;the&nbsp;background&nbsp;is&nbsp;invisible&nbsp;with&nbsp;building&nbsp;layer&nbsp;printed&nbsp;only.

I&nbsp;could&nbsp;not&nbsp;find&nbsp;any&nbsp;reference&nbsp;for&nbsp;this.

Thanks,

Rumeysa

&nbsp;

---

<div class="post-metadata">

**Author:** ![Johnny](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/johnny/32/19044_2.png) [@Johnny](https://community.thinkgeo.com/u/Johnny)\
**Post date:** [March 19, 2013, 7:45am UTC](https://community.thinkgeo.com/t/how-to-render-particular-features-of-interest-in-wms-server-edition/7377/6 "2013-03-19T07:45:31Z")

</div>

&nbsp;Hi&nbsp;Rumeysa,

&nbsp;  
In&nbsp;fact,&nbsp;I&nbsp;guess&nbsp;Edgar’s&nbsp;sample&nbsp;is&nbsp;correct,&nbsp;because&nbsp;our&nbsp;server&nbsp;returns&nbsp;the&nbsp;image&nbsp;with&nbsp;"png"&nbsp;format&nbsp;to&nbsp;client&nbsp;side&nbsp;after&nbsp;map&nbsp;refresh&nbsp;if&nbsp;you&nbsp;didn't&nbsp;do&nbsp;any&nbsp;changes&nbsp;here,&nbsp;the&nbsp;"png"&nbsp;image&nbsp;return&nbsp;from&nbsp;here&nbsp;is&nbsp;really&nbsp;with&nbsp;"transparent"&nbsp;background,&nbsp;if&nbsp;we&nbsp;use&nbsp;“Google&nbsp;Chrome”&nbsp;to&nbsp;run&nbsp;our&nbsp;“how&nbsp;do&nbsp;I&nbsp;sample”,&nbsp;then&nbsp;use&nbsp;“inspect&nbsp;element”&nbsp;function&nbsp;provided&nbsp;by&nbsp;“Google&nbsp;Chrome”,&nbsp;we&nbsp;will&nbsp;get&nbsp;the&nbsp;result&nbsp;image&nbsp;like&nbsp;the&nbsp;following:

 ![](https://community.thinkgeo.com/uploads/default/original/2X/f/fcf77cabfbd6afdbf06f2fd8ac04706ae5970126.png)  
  
As&nbsp;you&nbsp;can&nbsp;see&nbsp;the&nbsp;picture&nbsp;is&nbsp;transparent,&nbsp;doesn’t&nbsp;have&nbsp;a&nbsp;background.  
&nbsp;  
Hope&nbsp;it&nbsp;helps  
&nbsp;  
Johnny  
  
&nbsp;  

&nbsp;
