# Marker.XOffset /Marker.YOffset

**URL:** <https://community.thinkgeo.com/t/marker-xoffset-marker-yoffset/2102>\
**Category:** WinForms\
**Created:** [September 27, 2012, 5:09pm UTC](https://community.thinkgeo.com/t/marker-xoffset-marker-yoffset/2102 "2012-09-27T17:09:47Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bob3](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/b/4491bb/32.png) [@Bob3](https://community.thinkgeo.com/u/Bob3)\
**Post date:** [September 27, 2012, 5:09pm UTC](https://community.thinkgeo.com/t/marker-xoffset-marker-yoffset/2102/1 "2012-09-27T17:09:47Z")

</div>

Can&nbsp;you&nbsp;tell&nbsp;me&nbsp;what&nbsp;these&nbsp;properties&nbsp;are&nbsp;suppose&nbsp;to&nbsp;do?

I've&nbsp;created&nbsp;two&nbsp;different&nbsp;Marker&nbsp;Types&nbsp;on&nbsp;my&nbsp;map,&nbsp;1&nbsp;for&nbsp;Hospitals,&nbsp;1&nbsp;for&nbsp;Doctors.&nbsp;&nbsp;So&nbsp;far&nbsp;everything&nbsp;works&nbsp;OK,&nbsp;(separate&nbsp;Icons,&nbsp;etc.)&nbsp;but&nbsp;when&nbsp;I&nbsp;display&nbsp;the&nbsp;map&nbsp;the&nbsp;Icon&nbsp;for&nbsp;the&nbsp;Hospital&nbsp;is&nbsp;typically&nbsp;overwritten&nbsp;by&nbsp;the&nbsp;Icon&nbsp;for&nbsp;the&nbsp;Doctors&nbsp;(as&nbsp;many&nbsp;doctors&nbsp;offices&nbsp;are&nbsp;at&nbsp;the&nbsp;same&nbsp;geographic&nbsp;location&nbsp;as&nbsp;the&nbsp;Hospital.&nbsp;&nbsp;So&nbsp;I'd&nbsp;like&nbsp;to&nbsp;display&nbsp;the&nbsp;hospital&nbsp;Icons&nbsp;about&nbsp;8-16&nbsp;pixels&nbsp;away&nbsp;from&nbsp;the&nbsp;doctors&nbsp;so&nbsp;we&nbsp;can&nbsp;see&nbsp;both.

I&nbsp;tried&nbsp;using&nbsp;the&nbsp;XOffset/YOffset&nbsp;properties&nbsp;to&nbsp;accomplish&nbsp;this,&nbsp;but&nbsp;that&nbsp;doesn't&nbsp;seem&nbsp;to&nbsp;do&nbsp;what&nbsp;I&nbsp;thought&nbsp;it&nbsp;would&nbsp;do,&nbsp;so&nbsp;unless&nbsp;I've&nbsp;got&nbsp;it&nbsp;wrong,&nbsp;is&nbsp;there&nbsp;an&nbsp;easy&nbsp;way&nbsp;to&nbsp;set&nbsp;the&nbsp;point&nbsp;so&nbsp;that&nbsp;it&nbsp;displays&nbsp;about&nbsp;8-16&nbsp;pixels&nbsp;from&nbsp;its&nbsp;original&nbsp;location,&nbsp;and&nbsp;moves&nbsp;correctly&nbsp;when&nbsp;the&nbsp;map&nbsp;zooms&nbsp;in/out?

Thanks!!

bob

---

<div class="post-metadata">

**Author:** ![Allen](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/a/bbce88/32.png) [@Allen](https://community.thinkgeo.com/u/Allen)\
**Post date:** [September 28, 2012, 6:06am UTC](https://community.thinkgeo.com/t/marker-xoffset-marker-yoffset/2102/2 "2012-09-28T06:06:23Z")

</div>

Bob,&nbsp;the&nbsp;X&nbsp;and&nbsp;Y&nbsp;offsets&nbsp;just&nbsp;indicate&nbsp;how&nbsp;far&nbsp;from&nbsp;the&nbsp;feature&nbsp;the&nbsp;symbol&nbsp;or&nbsp;label&nbsp;is&nbsp;applied.&nbsp;&nbsp;We’ve&nbsp;had&nbsp;this&nbsp;issue&nbsp;with&nbsp;vehicle&nbsp;positions:&nbsp;if&nbsp;several&nbsp;vehicles&nbsp;are&nbsp;parked&nbsp;close&nbsp;to&nbsp;each&nbsp;other&nbsp;and&nbsp;the&nbsp;map&nbsp;is&nbsp;zoomed&nbsp;out&nbsp;a&nbsp;bit,&nbsp;they’re&nbsp;all&nbsp;stacked&nbsp;on&nbsp;top&nbsp;of&nbsp;each&nbsp;other&nbsp;(and&nbsp;the&nbsp;labels&nbsp;become&nbsp;a&nbsp;jumbed&nbsp;mess,&nbsp;too!).&nbsp;&nbsp;People&nbsp;have&nbsp;complained,&nbsp;and&nbsp;I&nbsp;can&nbsp;only&nbsp;respond&nbsp;with&nbsp;“the&nbsp;cars&nbsp;are&nbsp;parked&nbsp;next&nbsp;to&nbsp;each&nbsp;other&nbsp;and&nbsp;the&nbsp;map&nbsp;is&nbsp;zoomed&nbsp;to&nbsp;100,000&nbsp;scale…what&nbsp;do&nbsp;you&nbsp;expect?”&nbsp;&nbsp;&nbsp;We&nbsp;have&nbsp;not&nbsp;come&nbsp;up&nbsp;with&nbsp;a&nbsp;solution&nbsp;for&nbsp;this&nbsp;other&nbsp;than,&nbsp;perhaps,&nbsp;to&nbsp;write&nbsp;some&nbsp;code&nbsp;to&nbsp;determine&nbsp;if&nbsp;points&nbsp;are&nbsp;close&nbsp;to&nbsp;others&nbsp;and&nbsp;shift&nbsp;them&nbsp;a&nbsp;little,&nbsp;but&nbsp;I&nbsp;don’t&nbsp;know&nbsp;if&nbsp;that’s&nbsp;an&nbsp;acceptable&nbsp;or&nbsp;pratical&nbsp;solution.&nbsp;&nbsp;The&nbsp;other&nbsp;idea&nbsp;we’ve&nbsp;had&nbsp;is&nbsp;to&nbsp;use&nbsp;some&nbsp;sort&nbsp;of&nbsp;clustering&nbsp;and,&nbsp;instead&nbsp;of&nbsp;plotting&nbsp;points&nbsp;for&nbsp;one&nbsp;hospital&nbsp;and&nbsp;five&nbsp;doctors&nbsp;all&nbsp;within,&nbsp;say&nbsp;100&nbsp;feet,&nbsp;replace&nbsp;it&nbsp;with&nbsp;one&nbsp;point&nbsp;labeled&nbsp;“Hospital&nbsp;and&nbsp;5&nbsp;doctors”&nbsp;or&nbsp;something&nbsp;like&nbsp;that.&nbsp;&nbsp;And&nbsp;we’ve&nbsp;only&nbsp;considered&nbsp;these&nbsp;issues&nbsp;with&nbsp;a&nbsp;single&nbsp;entity,&nbsp;not&nbsp;like&nbsp;in&nbsp;your&nbsp;case&nbsp;where&nbsp;you&nbsp;have&nbsp;hospitals&nbsp;and&nbsp;doctors…imagine&nbsp;it&nbsp;would&nbsp;be&nbsp;even&nbsp;worse&nbsp;if&nbsp;there&nbsp;were&nbsp;nurses.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Allen

---

<div class="post-metadata">

**Author:** ![Ryan](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/r/a8b319/32.png) [@Ryan](https://community.thinkgeo.com/u/Ryan)\
**Post date:** [September 28, 2012, 11:15am UTC](https://community.thinkgeo.com/t/marker-xoffset-marker-yoffset/2102/3 "2012-09-28T11:15:52Z")

</div>

Hi&nbsp;Bob&nbsp;and&nbsp;Allen,

You&nbsp;might&nbsp;take&nbsp;a&nbsp;look&nbsp;at&nbsp;our&nbsp;Cluster&nbsp;Point&nbsp;Style&nbsp;to&nbsp;see&nbsp;if&nbsp;this&nbsp;might&nbsp;help&nbsp;to&nbsp;combine&nbsp;some&nbsp;of&nbsp;your&nbsp;points&nbsp;and&nbsp;to&nbsp;'clean&nbsp;up'&nbsp;the&nbsp;map&nbsp;a&nbsp;bit.&nbsp;A&nbsp;C#&nbsp;sample&nbsp;for&nbsp;Cluster&nbsp;Point&nbsp;Style&nbsp;can&nbsp;be&nbsp;found&nbsp;in&nbsp;our&nbsp;Wiki&nbsp;here:&nbsp;[wiki.thinkgeo.com/wiki/Map\_S...PointStyle](http://wiki.thinkgeo.com/wiki/Map_Suite_Desktop_Edition_Styles_Samples#ClusterPointStyle)

---

<div class="post-metadata">

**Author:** ![Allen](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/a/bbce88/32.png) [@Allen](https://community.thinkgeo.com/u/Allen)\
**Post date:** [September 28, 2012, 12:13pm UTC](https://community.thinkgeo.com/t/marker-xoffset-marker-yoffset/2102/4 "2012-09-28T12:13:24Z")

</div>

Ryan,&nbsp;  
&nbsp;&nbsp;  
&nbsp;Yes&nbsp;I&nbsp;know&nbsp;about&nbsp;that…I&nbsp;just&nbsp;didn’t&nbsp;think&nbsp;it&nbsp;would&nbsp;work&nbsp;to&nbsp;combine&nbsp;two&nbsp;different&nbsp;types&nbsp;of&nbsp;items.&nbsp;&nbsp;Showing&nbsp;“6”&nbsp;doesn’t&nbsp;tell&nbsp;1&nbsp;hospital&nbsp;and&nbsp;5&nbsp;doctors.&nbsp;&nbsp;In&nbsp;our&nbsp;case,&nbsp;all&nbsp;we’d&nbsp;show&nbsp;is&nbsp;vehicles,&nbsp;so&nbsp;a&nbsp;count&nbsp;would&nbsp;obviously&nbsp;be&nbsp;a&nbsp;count&nbsp;of&nbsp;&nbsp;vehicles.&nbsp;&nbsp;Plus&nbsp;Bob&nbsp;didn’t&nbsp;say&nbsp;if&nbsp;the&nbsp;hospitals&nbsp;and&nbsp;doctors&nbsp;were&nbsp;in&nbsp;the&nbsp;same&nbsp;layer.&nbsp;&nbsp;I&nbsp;kind&nbsp;of&nbsp;doubt&nbsp;Cluster&nbsp;Point&nbsp;Style&nbsp;would&nbsp;cover&nbsp;points&nbsp;in&nbsp;more&nbsp;than&nbsp;one&nbsp;layer.&nbsp;&nbsp;Sounds&nbsp;pretty&nbsp;tricky.&nbsp;&nbsp;But&nbsp;even&nbsp;if&nbsp;it&nbsp;reduced&nbsp;Bob’s&nbsp;stuff&nbsp;to&nbsp;one&nbsp;hospital&nbsp;point&nbsp;and&nbsp;one&nbsp;symbol&nbsp;of&nbsp;a&nbsp;cluster&nbsp;of&nbsp;5&nbsp;doctors&nbsp;(if&nbsp;they&nbsp;were&nbsp;in&nbsp;different&nbsp;layers)&nbsp;it&nbsp;would&nbsp;reduce&nbsp;the&nbsp;points&nbsp;symbolized&nbsp;from&nbsp;6&nbsp;to&nbsp;2.&nbsp;&nbsp;I&nbsp;guess&nbsp;it&nbsp;all&nbsp;depends&nbsp;on&nbsp;where&nbsp;the&nbsp;hospital&nbsp;point&nbsp;is&nbsp;placed&nbsp;if&nbsp;there&nbsp;is&nbsp;still&nbsp;some&nbsp;overlap&nbsp;of&nbsp;symbols.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Allen

---

<div class="post-metadata">

**Author:** ![Ryan](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/r/a8b319/32.png) [@Ryan](https://community.thinkgeo.com/u/Ryan)\
**Post date:** [October 1, 2012, 10:24am UTC](https://community.thinkgeo.com/t/marker-xoffset-marker-yoffset/2102/5 "2012-10-01T10:24:28Z")

</div>

Hi&nbsp;Allen,&nbsp;&nbsp;  
&nbsp;&nbsp;  
&nbsp;I&nbsp;believe&nbsp;you&nbsp;are&nbsp;correct&nbsp;that&nbsp;for&nbsp;two&nbsp;seperate&nbsp;layers&nbsp;you&nbsp;would&nbsp;need&nbsp;a&nbsp;ClusterPointStyle&nbsp;for&nbsp;each.&nbsp;This&nbsp;is&nbsp;a&nbsp;bit&nbsp;of&nbsp;a&nbsp;tricky&nbsp;situation&nbsp;expecially&nbsp;if&nbsp;you&nbsp;need&nbsp;to&nbsp;show&nbsp;all&nbsp;of&nbsp;that&nbsp;information&nbsp;at&nbsp;a&nbsp;very&nbsp;large&nbsp;scale.&nbsp;I&nbsp;think&nbsp;the&nbsp;best&nbsp;option&nbsp;would&nbsp;be&nbsp;to&nbsp;give&nbsp;your&nbsp;users&nbsp;options.&nbsp;Perhaps&nbsp;a&nbsp;combination&nbsp;of&nbsp;ClusterPointStyles,&nbsp;zooming,&nbsp;and&nbsp;a&nbsp;control&nbsp;to&nbsp;turn&nbsp;on&nbsp;and&nbsp;off&nbsp;layers&nbsp;would&nbsp;allow&nbsp;them&nbsp;to&nbsp;see&nbsp;the&nbsp;data&nbsp;they&nbsp;want&nbsp;without&nbsp;the&nbsp;unwanted&nbsp;overlapping?

---

<div class="post-metadata">

**Author:** ![Allen](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/a/bbce88/32.png) [@Allen](https://community.thinkgeo.com/u/Allen)\
**Post date:** [October 1, 2012, 11:59am UTC](https://community.thinkgeo.com/t/marker-xoffset-marker-yoffset/2102/6 "2012-10-01T11:59:22Z")

</div>

Yeah,&nbsp;it&nbsp;sounds&nbsp;a&nbsp;bit&nbsp;complicated&nbsp;with&nbsp;more&nbsp;than&nbsp;one&nbsp;layer,&nbsp;so&nbsp;I’m&nbsp;staying&nbsp;away&nbsp;from&nbsp;the&nbsp;idea.&nbsp;&nbsp;That&nbsp;said,&nbsp;I’ll&nbsp;probably&nbsp;have&nbsp;to&nbsp;do&nbsp;it&nbsp;next&nbsp;week…

---

<div class="post-metadata">

**Author:** ![Bob3](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/b/4491bb/32.png) [@Bob3](https://community.thinkgeo.com/u/Bob3)\
**Post date:** [October 1, 2012, 12:09pm UTC](https://community.thinkgeo.com/t/marker-xoffset-marker-yoffset/2102/7 "2012-10-01T12:09:20Z")

</div>

Here&nbsp;is&nbsp;the&nbsp;final&nbsp;(for&nbsp;now)&nbsp;solution&nbsp;I’ve&nbsp;decided&nbsp;upon:&nbsp;&nbsp;I&nbsp;have&nbsp;a&nbsp;checkbox&nbsp;to&nbsp;disply&nbsp;physicians,&nbsp;and&nbsp;another&nbsp;one&nbsp;for&nbsp;hospitals…So&nbsp;this&nbsp;is&nbsp;like&nbsp;layering…and&nbsp;if&nbsp;they&nbsp;choose&nbsp;to&nbsp;display&nbsp;ONLY&nbsp;hospitals&nbsp;they&nbsp;can&nbsp;all&nbsp;be&nbsp;seen,&nbsp;then&nbsp;if&nbsp;they&nbsp;add&nbsp;back&nbsp;the&nbsp;physicians&nbsp;they&nbsp;can&nbsp;see&nbsp;which&nbsp;physicians&nbsp;overlap…&nbsp;  
&nbsp;&nbsp;  
&nbsp;About&nbsp;the&nbsp;best&nbsp;for&nbsp;now&nbsp;since&nbsp;“moving”&nbsp;the&nbsp;icon&nbsp;a&nbsp;couple&nbsp;of&nbsp;pixels&nbsp;isn’t&nbsp;really&nbsp;an&nbsp;option&nbsp;right&nbsp;now&nbsp;as&nbsp;described&nbsp;above.&nbsp;  
&nbsp;&nbsp;  
&nbsp;THANK&nbsp;YOU&nbsp;ALL&nbsp;FOR&nbsp;THE&nbsp;GREAT&nbsp;IDEAS!!&nbsp;  
&nbsp;&nbsp;  
&nbsp;bob

---

<div class="post-metadata">

**Author:** ![David](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/d/aeb1de/32.png) [@David](https://community.thinkgeo.com/u/David)\
**Post date:** [October 2, 2012, 10:19am UTC](https://community.thinkgeo.com/t/marker-xoffset-marker-yoffset/2102/8 "2012-10-02T10:19:53Z")

</div>

Bob,&nbsp;  
&nbsp;&nbsp;  
&nbsp;&nbsp;&nbsp;In&nbsp;thinking&nbsp;about&nbsp;this&nbsp;there&nbsp;is&nbsp;another&nbsp;solution&nbsp;that&nbsp;might&nbsp;work&nbsp;out&nbsp;really&nbsp;well.&nbsp;&nbsp;You&nbsp;could&nbsp;create&nbsp;a&nbsp;new&nbsp;kind&nbsp;of&nbsp;layer&nbsp;that&nbsp;inherits&nbsp;from&nbsp;FeatureLayer&nbsp;and&nbsp;in&nbsp;this&nbsp;layer&nbsp;you&nbsp;could&nbsp;add&nbsp;a&nbsp;property&nbsp;which&nbsp;is&nbsp;a&nbsp;collection&nbsp;of&nbsp;layers.&nbsp;&nbsp;The&nbsp;layers&nbsp;you&nbsp;would&nbsp;add&nbsp;to&nbsp;this&nbsp;collection&nbsp;would&nbsp;be&nbsp;the&nbsp;hospitals&nbsp;and&nbsp;doctors&nbsp;layers.&nbsp;&nbsp;Inside&nbsp;this&nbsp;new&nbsp;layer&nbsp;you&nbsp;would&nbsp;override&nbsp;the&nbsp;GetFeaturesInBoundingBox&nbsp;and&nbsp;a&nbsp;few&nbsp;other&nbsp;key&nbsp;methods&nbsp;to&nbsp;basically&nbsp;do&nbsp;the&nbsp;following.&nbsp;&nbsp;When&nbsp;the&nbsp;new&nbsp;layer&nbsp;is&nbsp;queried&nbsp;to&nbsp;be&nbsp;be&nbsp;drawn&nbsp;it&nbsp;actually&nbsp;queries&nbsp;all&nbsp;of&nbsp;the&nbsp;layers&nbsp;in&nbsp;the&nbsp;collection&nbsp;and&nbsp;aggregate&nbsp;the&nbsp;results.&nbsp;&nbsp;It&nbsp;basically&nbsp;does&nbsp;a&nbsp;join&nbsp;of&nbsp;the&nbsp;two&nbsp;layers&nbsp;so&nbsp;the&nbsp;column&nbsp;values&nbsp;would&nbsp;include&nbsp;the&nbsp;ones&nbsp;from&nbsp;the&nbsp;doctors&nbsp;and&nbsp;hospitals.&nbsp;&nbsp;In&nbsp;this&nbsp;way&nbsp;you&nbsp;could&nbsp;configure&nbsp;just&nbsp;one&nbsp;style&nbsp;for&nbsp;the&nbsp;combined&nbsp;layers&nbsp;and&nbsp;use&nbsp;a&nbsp;layered&nbsp;style&nbsp;to&nbsp;show&nbsp;one&nbsp;icon&nbsp;and&nbsp;also&nbsp;other&nbsp;layered&nbsp;styles&nbsp;to&nbsp;show&nbsp;the&nbsp;number&nbsp;of&nbsp;doctors&nbsp;or&nbsp;other&nbsp;information.&nbsp;Imagine&nbsp;one&nbsp;icon&nbsp;with&nbsp;some&nbsp;other&nbsp;‘sections’&nbsp;such&nbsp;as&nbsp;the&nbsp;number&nbsp;of&nbsp;doctors&nbsp;int&nbsp;he&nbsp;upper&nbsp;left&nbsp;of&nbsp;the&nbsp;icon&nbsp;and&nbsp;the&nbsp;hospitals&nbsp;rating&nbsp;in&nbsp;the&nbsp;bottom&nbsp;right&nbsp;area&nbsp;of&nbsp;the&nbsp;icon.&nbsp;&nbsp;This&nbsp;can&nbsp;all&nbsp;be&nbsp;done&nbsp;easily&nbsp;once&nbsp;we&nbsp;union&nbsp;the&nbsp;data.&nbsp;&nbsp;It&nbsp;may&nbsp;also&nbsp;be&nbsp;possible&nbsp;to&nbsp;make&nbsp;this&nbsp;work&nbsp;seamlessly&nbsp;with&nbsp;the&nbsp;cluster&nbsp;style&nbsp;or&nbsp;do&nbsp;some&nbsp;clustering&nbsp;in&nbsp;the&nbsp;new&nbsp;layer.&nbsp;If&nbsp;you&nbsp;are&nbsp;interested&nbsp;let&nbsp;me&nbsp;know&nbsp;and&nbsp;also&nbsp;if&nbsp;you&nbsp;could&nbsp;explain&nbsp;your&nbsp;data&nbsp;a&nbsp;little&nbsp;better&nbsp;we&nbsp;might&nbsp;be&nbsp;able&nbsp;to&nbsp;work&nbsp;up&nbsp;a&nbsp;simple&nbsp;sample&nbsp;to&nbsp;include&nbsp;in&nbsp;our&nbsp;code&nbsp;community.&nbsp;&nbsp;If&nbsp;this&nbsp;is&nbsp;something&nbsp;you&nbsp;need&nbsp;quickly&nbsp;I&nbsp;think&nbsp;our&nbsp;professional&nbsp;services&nbsp;team&nbsp;could&nbsp;do&nbsp;this&nbsp;in&nbsp;just&nbsp;a&nbsp;few&nbsp;hours&nbsp;as&nbsp;another&nbsp;option.&nbsp;&nbsp;If&nbsp;not&nbsp;it&nbsp;might&nbsp;be&nbsp;next&nbsp;week&nbsp;before&nbsp;I&nbsp;have&nbsp;a&nbsp;resource&nbsp;to&nbsp;look&nbsp;into&nbsp;this.&nbsp;  
&nbsp;&nbsp;  
&nbsp;David
