# Issue with reverse Geocoding on marker popup

**URL:** <https://community.thinkgeo.com/t/issue-with-reverse-geocoding-on-marker-popup/4227>\
**Category:** MVC\
**Created:** [September 5, 2014, 5:22am UTC](https://community.thinkgeo.com/t/issue-with-reverse-geocoding-on-marker-popup/4227 "2014-09-05T05:22:57Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Eric5](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/e/7feea3/32.png) [@Eric5](https://community.thinkgeo.com/u/Eric5)\
**Post date:** [September 5, 2014, 5:22am UTC](https://community.thinkgeo.com/t/issue-with-reverse-geocoding-on-marker-popup/4227/1 "2014-09-05T05:22:57Z")

</div>

Hello,  
  
  
  
I&nbsp;have&nbsp;issue&nbsp;with&nbsp;marker&nbsp;popup&nbsp;as&nbsp;I&nbsp;have&nbsp;implement&nbsp;reverse&nbsp;geocoding&nbsp;on&nbsp;map&nbsp;right&nbsp;click&nbsp;event.&nbsp;but&nbsp;issue&nbsp;is&nbsp;like&nbsp;that&nbsp;when&nbsp;I&nbsp;search&nbsp;some&nbsp;location&nbsp;it&nbsp;will&nbsp;return&nbsp;location&nbsp;and&nbsp;show&nbsp;marker&nbsp;and&nbsp;popup&nbsp;to&nbsp;locate&nbsp;that&nbsp;location&nbsp;on&nbsp;map.&nbsp;Now&nbsp;I&nbsp;right&nbsp;click&nbsp;on&nbsp;map&nbsp;nearest&nbsp;to&nbsp;that&nbsp;marker&nbsp;but&nbsp;it&nbsp;did&nbsp;not&nbsp;fire&nbsp;map&nbsp;right&nbsp;click&nbsp;event.&nbsp;  
  
  
  
Issue&nbsp;is&nbsp;like&nbsp;that&nbsp;in&nbsp;cloud&nbsp;popup&nbsp;Thinkgeo&nbsp;use&nbsp;Cloud&nbsp;popup&nbsp;image&nbsp;to&nbsp;generate&nbsp;div&nbsp;for&nbsp;popup&nbsp;and&nbsp;also&nbsp;it&nbsp;set&nbsp;z-index&nbsp;of&nbsp;that&nbsp;div&nbsp;to&nbsp;max&nbsp;so&nbsp;that&nbsp;it&nbsp;comes&nbsp;over&nbsp;all&nbsp;other&nbsp;layer&nbsp;of&nbsp;the&nbsp;map.&nbsp;so&nbsp;that&nbsp;it&nbsp;did&nbsp;not&nbsp;allow&nbsp;me&nbsp;to&nbsp;fire&nbsp;right&nbsp;click&nbsp;event&nbsp;of&nbsp;map.&nbsp;So&nbsp;is&nbsp;there&nbsp;any&nbsp;way&nbsp;so&nbsp;that&nbsp;I&nbsp;can&nbsp;register&nbsp;or&nbsp;fire&nbsp;map&nbsp;right&nbsp;click&nbsp;event&nbsp;even&nbsp;if&nbsp;popup&nbsp;of&nbsp;marker&nbsp;is&nbsp;open.  
  
  
  
I&nbsp;am&nbsp;attaching&nbsp;image&nbsp;to&nbsp;show&nbsp;exact&nbsp;issue.  
  
  
  
Thank&nbsp;you.  
  
Eric.

---

<div class="post-metadata">

**Author:** ![Eric5](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/e/7feea3/32.png) [@Eric5](https://community.thinkgeo.com/u/Eric5)\
**Post date:** [September 9, 2014, 5:02am UTC](https://community.thinkgeo.com/t/issue-with-reverse-geocoding-on-marker-popup/4227/2 "2014-09-09T05:02:52Z")

</div>

Hello,&nbsp;  
&nbsp;&nbsp;  
&nbsp;Does&nbsp;any&nbsp;one&nbsp;have&nbsp;idea&nbsp;about&nbsp;my&nbsp;issue&nbsp;for&nbsp;reverse&nbsp;geocoding&nbsp;nearest&nbsp;to&nbsp;marker&nbsp;popup.&nbsp;How&nbsp;can&nbsp;I&nbsp;assign&nbsp;event&nbsp;on&nbsp;Cloud&nbsp;popup&nbsp;as&nbsp;cloud&nbsp;popup&nbsp;is&nbsp;creating&nbsp;using&nbsp;image&nbsp;and&nbsp;create&nbsp;a&nbsp;div&nbsp;for&nbsp;that&nbsp;and&nbsp;add&nbsp;z-index&nbsp;to&nbsp;max&nbsp;so&nbsp;that&nbsp;it&nbsp;shows&nbsp;to&nbsp;above&nbsp;all&nbsp;other&nbsp;layers.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Thank&nbsp;you.&nbsp;  
&nbsp;Eric.&nbsp;  
&nbsp;&nbsp;

---

<div class="post-metadata">

**Author:** ![Troy](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/t/85f322/32.png) [@Troy](https://community.thinkgeo.com/u/Troy)\
**Post date:** [September 10, 2014, 6:59am UTC](https://community.thinkgeo.com/t/issue-with-reverse-geocoding-on-marker-popup/4227/3 "2014-09-10T06:59:07Z")

</div>

Hi&nbsp;Eric,&nbsp;  
&nbsp;&nbsp;  
&nbsp;I&nbsp;am&nbsp;afraid&nbsp;it&nbsp;is&nbsp;hard&nbsp;to&nbsp;do&nbsp;this.&nbsp;I&nbsp;will&nbsp;let&nbsp;our&nbsp;development&nbsp;team&nbsp;have&nbsp;another&nbsp;test&nbsp;and&nbsp;I&nbsp;don’t&nbsp;have&nbsp;too&nbsp;much&nbsp;confidence&nbsp;on&nbsp;this.&nbsp;&nbsp;  
&nbsp;&nbsp;  
&nbsp;BTW,&nbsp;we&nbsp;are&nbsp;using&nbsp;Openlayers&nbsp;as&nbsp;the&nbsp;client&nbsp;map&nbsp;render&nbsp;engine&nbsp;in&nbsp;case&nbsp;you&nbsp;can&nbsp;have&nbsp;any&nbsp;insights&nbsp;on&nbsp;this.&nbsp;  
&nbsp;Thanks,&nbsp;  
&nbsp;Troy&nbsp;

---

<div class="post-metadata">

**Author:** ![Eric5](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/e/7feea3/32.png) [@Eric5](https://community.thinkgeo.com/u/Eric5)\
**Post date:** [September 19, 2014, 6:41am UTC](https://community.thinkgeo.com/t/issue-with-reverse-geocoding-on-marker-popup/4227/4 "2014-09-19T06:41:42Z")

</div>

Hello&nbsp;Troy,&nbsp;  
&nbsp;&nbsp;  
&nbsp;Is&nbsp;there&nbsp;any&nbsp;other&nbsp;way&nbsp;to&nbsp;do&nbsp;reverse&nbsp;geocoding&nbsp;or&nbsp;any&nbsp;chance&nbsp;that&nbsp;we&nbsp;can&nbsp;achieve&nbsp;this&nbsp;or&nbsp;your&nbsp;developer&nbsp;can&nbsp;make&nbsp;some&nbsp;change&nbsp;for&nbsp;that.&nbsp;If&nbsp;than&nbsp;please&nbsp;let&nbsp;me&nbsp;know.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Thank&nbsp;you.&nbsp;  
&nbsp;Eric.

---

<div class="post-metadata">

**Author:** ![Troy](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/t/85f322/32.png) [@Troy](https://community.thinkgeo.com/u/Troy)\
**Post date:** [September 22, 2014, 3:00am UTC](https://community.thinkgeo.com/t/issue-with-reverse-geocoding-on-marker-popup/4227/5 "2014-09-22T03:00:55Z")

</div>

Hi&nbsp;Eric,  
  
  
  
I&nbsp;try&nbsp;to&nbsp;use&nbsp;InMemoryMarkerOverlay&nbsp;as&nbsp;the&nbsp;marker&nbsp;overlay&nbsp;and&nbsp;then&nbsp;I&nbsp;can&nbsp;use&nbsp;the&nbsp;below&nbsp;codes&nbsp;to&nbsp;trigger&nbsp;the&nbsp;right&nbsp;click,&nbsp;would&nbsp;you&nbsp;please&nbsp;have&nbsp;a&nbsp;try?

> `<script type=`\<code style="color: blue;"\>"text/javascript"`<code style="color: #000000;">>    function OnMapCreating(map) {        document.getElementById(‘map’).oncontextmenu = function (e) {            e = e ? e : window.event;            if (e.preventDefault) e.preventDefault(); // For non-IE browsers.            else return false; // For IE browsers.        };         OpenLayers.Control.MyClick = OpenLayers.Class(OpenLayers.Control, {            defaultHandlerOptions: {                ‘single’: true,                ‘double’: true,                ‘pixelTolerance’: 0,                ‘stopSingle’: false,                ‘stopDouble’: false            },            handleRightClicks: true,            initialize: function (options) {                this.handlerOptions = OpenLayers.Util.extend({}, this.defaultHandlerOptions);                OpenLayers.Control.prototype.initialize.apply(this, arguments);                this.handler = new OpenLayers.Handler.Click(this, this.eventMethods, this.handlerOptions);            }        });    }     function OnMapCreated(map) {        var oClick = new OpenLayers.Control.MyClick({            eventMethods: {                ‘rightclick’: function (e) {                    alert(‘rightclick at ‘ + e.xy.x + ’,’ + e.xy.y);                },                ‘click’: function(e) {                alert(‘click at ‘+e.xy.x+’,’+e.xy.y);                },                ‘dblclick’: function(e) {                alert(‘dblclick at ‘+e.xy.x+’,’+e.xy.y);                },                ‘dblrightclick’: function(e) {                alert(‘dblrightclick at ‘+e.xy.x+’,’+e.xy.y);                }            }        });        map.addControl(oClick);        oClick.activate();    }</script>`

`Please let us know if the issue persists.Thanks,Troy`

---

<div class="post-metadata">

**Author:** ![Eric5](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/e/7feea3/32.png) [@Eric5](https://community.thinkgeo.com/u/Eric5)\
**Post date:** [September 22, 2014, 6:07am UTC](https://community.thinkgeo.com/t/issue-with-reverse-geocoding-on-marker-popup/4227/6 "2014-09-22T06:07:19Z")

</div>

Hello&nbsp;Troy,  
  
  
  
Thank&nbsp;you&nbsp;for&nbsp;your&nbsp;reply.&nbsp;I&nbsp;have&nbsp;already&nbsp;implement&nbsp;right&nbsp;click&nbsp;event&nbsp;by&nbsp;using&nbsp;that&nbsp;code.  
  
But  
my&nbsp;issue&nbsp;is&nbsp;different.&nbsp;Issue&nbsp;is&nbsp;like&nbsp;I&nbsp;have&nbsp;done&nbsp;reverse&nbsp;geocoding&nbsp;on  
right&nbsp;click&nbsp;its&nbsp;working&nbsp;perfectly&nbsp;now&nbsp;when&nbsp;I&nbsp;do&nbsp;reverse&nbsp;geocoding&nbsp;it  
return&nbsp;me&nbsp;one&nbsp;location&nbsp;and&nbsp;open&nbsp;Cloudpopup&nbsp;on&nbsp;the&nbsp;map&nbsp;till&nbsp;here&nbsp;its  
prefect.&nbsp;Now&nbsp;when&nbsp;I&nbsp;right&nbsp;click&nbsp;near&nbsp;to&nbsp;CloudPopup&nbsp;which&nbsp;opens&nbsp;on  
reverse&nbsp;geocoding&nbsp;than&nbsp;it&nbsp;does&nbsp;not&nbsp;trigger&nbsp;function&nbsp;for&nbsp;reverse  
geocoding.  
  
  
  
I&nbsp;have&nbsp;attached&nbsp;image&nbsp;for&nbsp;that.  
  
  
  
When&nbsp;you&nbsp;open&nbsp;image&nbsp;you&nbsp;can&nbsp;see&nbsp;that&nbsp;I&nbsp;have&nbsp;marked&nbsp;some&nbsp;area&nbsp;with&nbsp;Black  
border&nbsp;in&nbsp;image&nbsp;so&nbsp;now&nbsp;when&nbsp;I&nbsp;right&nbsp;click&nbsp;on&nbsp;that&nbsp;area&nbsp;than&nbsp;it&nbsp;does&nbsp;not  
trigger&nbsp;map’s&nbsp;right&nbsp;click&nbsp;event&nbsp;which&nbsp;I&nbsp;have&nbsp;register.&nbsp;So&nbsp;is&nbsp;there&nbsp;any  
way&nbsp;to&nbsp;achieve&nbsp;that.  
  
  
  
Please&nbsp;check&nbsp;image&nbsp;and&nbsp;let&nbsp;me&nbsp;know.  
  
  
  
Thank&nbsp;you.  
  
Eric.

 ![](https://community.thinkgeo.com/uploads/default/original/2X/3/33c4b17189836446c81b5cd4508442ea1c2ebb6d.png)

---

<div class="post-metadata">

**Author:** ![Troy](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/t/85f322/32.png) [@Troy](https://community.thinkgeo.com/u/Troy)\
**Post date:** [September 23, 2014, 5:47am UTC](https://community.thinkgeo.com/t/issue-with-reverse-geocoding-on-marker-popup/4227/7 "2014-09-23T05:47:41Z")

</div>

Hi&nbsp;Eric,  
  
  
  
Thanks&nbsp;for&nbsp;your&nbsp;image,&nbsp;it’s&nbsp;very&nbsp;clear&nbsp;for&nbsp;us.&nbsp;  
  
In&nbsp;order&nbsp;to&nbsp;go&nbsp;though&nbsp;the&nbsp;Clouldpopup&nbsp;div&nbsp;click&nbsp;events,&nbsp;a&nbsp;workaround&nbsp;is&nbsp;we&nbsp;can&nbsp;set&nbsp;pointerEvents&nbsp;to&nbsp;‘none’&nbsp;for&nbsp;the&nbsp;popup&nbsp;container.&nbsp;Please&nbsp;try&nbsp;the&nbsp;below&nbsp;codes:

> `function ConfiguratePopupClickEvent() {`  
> `        ``var popupDivs = document.getElementsByClassName(‘olPopup’);`  
> `        ``if (popupDivs) {`  
> `            ``for (var i = 0; i < popupDivs.length; i++) {`  
> `                ``popupDivs<i>.style.pointerEvents = ‘none’;`  
> &nbsp;  
> `                ``for (var j = 0; j < popupDivs<i>.firstChild.childNodes.length; j++) {`  
> `                    ``var childElement = popupDivs<i>.firstChild.childNodes[j];`  
> &nbsp;  
> `                    ``if (childElement.id.indexOf(‘FrameDecorationDiv_4’) < 0) {`  
> `                        ``childElement.style.pointerEvents = ‘auto’;`  
> `                    ``}`  
> `                ``}`  
> `            ``}`  
> `        ``}`  
> `}`

  
From&nbsp;the&nbsp;above&nbsp;codes,&nbsp;we&nbsp;add&nbsp;more&nbsp;codes&nbsp;to&nbsp;avoid&nbsp;the&nbsp;mouse&nbsp;events&nbsp;will&nbsp;go&nbsp;though&nbsp;all&nbsp;the&nbsp;popup&nbsp;divs&nbsp;rather&nbsp;than&nbsp;the&nbsp;highlight&nbsp;div&nbsp;where&nbsp;you&nbsp;pointed&nbsp;out.  
  
  
  
Please&nbsp;let&nbsp;us&nbsp;know&nbsp;if&nbsp;it&nbsp;works.  
  
Thanks,  
  
Troy

---

<div class="post-metadata">

**Author:** ![Eric5](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/e/7feea3/32.png) [@Eric5](https://community.thinkgeo.com/u/Eric5)\
**Post date:** [September 29, 2014, 8:33am UTC](https://community.thinkgeo.com/t/issue-with-reverse-geocoding-on-marker-popup/4227/8 "2014-09-29T08:33:42Z")

</div>

Hello&nbsp;Troy,  
  
  
  
Thank&nbsp;you&nbsp;for&nbsp;your&nbsp;reply.&nbsp;Yes&nbsp;the&nbsp;code&nbsp;is&nbsp;worked&nbsp;for&nbsp;me.&nbsp;But&nbsp;issue&nbsp;is&nbsp;like&nbsp;that&nbsp;its&nbsp;working&nbsp;on&nbsp;at&nbsp;right&nbsp;side&nbsp;of&nbsp;the&nbsp;Marker&nbsp;popup&nbsp;(as&nbsp;per&nbsp;image&nbsp;of&nbsp;black&nbsp;bordered&nbsp;portion)&nbsp;rest&nbsp;of&nbsp;the&nbsp;place&nbsp;it&nbsp;does&nbsp;nothing.&nbsp;And&nbsp;how&nbsp;can&nbsp;I&nbsp;achieve&nbsp;click&nbsp;event&nbsp;on&nbsp;that&nbsp;popup.&nbsp;Please&nbsp;let&nbsp;me&nbsp;know&nbsp;how&nbsp;can&nbsp;I&nbsp;go&nbsp;through&nbsp;all&nbsp;popup&nbsp;divs.?  
  
  
  
Thank&nbsp;you.  
  
Eric.

---

<div class="post-metadata">

**Author:** ![Eric5](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/e/7feea3/32.png) [@Eric5](https://community.thinkgeo.com/u/Eric5)\
**Post date:** [September 29, 2014, 9:30am UTC](https://community.thinkgeo.com/t/issue-with-reverse-geocoding-on-marker-popup/4227/9 "2014-09-29T09:30:56Z")

</div>

Sorry&nbsp;Troy,&nbsp;  
&nbsp;&nbsp;  
&nbsp;Its&nbsp;working&nbsp;only&nbsp;in&nbsp;IE10&nbsp;and&nbsp;that&nbsp;also&nbsp;working&nbsp;without&nbsp;the&nbsp;function&nbsp;that&nbsp;you&nbsp;provided.&nbsp;And&nbsp;where&nbsp;I&nbsp;have&nbsp;to&nbsp;call&nbsp;this&nbsp;function&nbsp;actually&nbsp;I&nbsp;am&nbsp;calling&nbsp;this&nbsp;function&nbsp;at&nbsp;call&nbsp;back&nbsp;event&nbsp;when&nbsp;I&nbsp;add&nbsp;marker&nbsp;in&nbsp;SimpleMarkerOverlay&nbsp;at&nbsp;javascript.&nbsp;  
&nbsp;And&nbsp;I&nbsp;got&nbsp;error&nbsp;like&nbsp;“Unable&nbsp;to&nbsp;set&nbsp;property&nbsp;‘pointerEvents’&nbsp;of&nbsp;undefined&nbsp;or&nbsp;null&nbsp;reference”.&nbsp;so&nbsp;did&nbsp;I&nbsp;miss&nbsp;placed&nbsp;the&nbsp;function.&nbsp;Let&nbsp;me&nbsp;know&nbsp;your&nbsp;review&nbsp;about&nbsp;this&nbsp;and&nbsp;let&nbsp;me&nbsp;know&nbsp;if&nbsp;you&nbsp;need&nbsp;code&nbsp;for&nbsp;this.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Thank&nbsp;you.&nbsp;  
&nbsp;Eric.

---

<div class="post-metadata">

**Author:** ![Troy](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/t/85f322/32.png) [@Troy](https://community.thinkgeo.com/u/Troy)\
**Post date:** [September 30, 2014, 1:49am UTC](https://community.thinkgeo.com/t/issue-with-reverse-geocoding-on-marker-popup/4227/10 "2014-09-30T01:49:21Z")

</div>

Hi&nbsp;Eric,  
  
  
  
I&nbsp;figure&nbsp;out&nbsp;a&nbsp;better&nbsp;solution&nbsp;without&nbsp;any&nbsp;java&nbsp;script&nbsp;codes&nbsp;by&nbsp;using&nbsp;CSS,&nbsp;in&nbsp;this&nbsp;way,&nbsp;we&nbsp;can&nbsp;drop&nbsp;the&nbsp;complex&nbsp;java&nbsp;script&nbsp;provided&nbsp;before:

> `<style type=`\<code style="color: blue;"\>"text/css"`<code style="color: #000000;">>    .olPopup {        pointer-events: none;    }     .olFramedCloudPopupContent {        pointer-events: all;    }</style>`

`I tested it in Chrome and Firforx, IE. Chrome and FireForx works fine.In IE browser, no matter this solution or the previous one, the event still can’t go though one corner with point-events and I believe this is related with IE events strategy. The wrong corner is like the below green rectangle. Please let me know if any questions.Thanks,Troy`

---

<div class="post-metadata">

**Author:** ![Eric5](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/e/7feea3/32.png) [@Eric5](https://community.thinkgeo.com/u/Eric5)\
**Post date:** [October 1, 2014, 5:35am UTC](https://community.thinkgeo.com/t/issue-with-reverse-geocoding-on-marker-popup/4227/11 "2014-10-01T05:35:25Z")

</div>

Hello&nbsp;Troy,&nbsp;  
&nbsp;&nbsp;  
&nbsp;Thank&nbsp;you&nbsp;for&nbsp;your&nbsp;reply.&nbsp;Its&nbsp;working.&nbsp;&nbsp;  
&nbsp;Thank&nbsp;you&nbsp;for&nbsp;your&nbsp;help.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Eric.

---

<div class="post-metadata">

**Author:** ![Troy](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/t/85f322/32.png) [@Troy](https://community.thinkgeo.com/u/Troy)\
**Post date:** [October 1, 2014, 8:44pm UTC](https://community.thinkgeo.com/t/issue-with-reverse-geocoding-on-marker-popup/4227/12 "2014-10-01T20:44:58Z")

</div>

You&nbsp;are&nbsp;welcome,&nbsp;Eric.&nbsp;  
&nbsp;&nbsp;  
&nbsp;Any&nbsp;other&nbsp;questions,&nbsp;please&nbsp;feel&nbsp;free&nbsp;to&nbsp;let&nbsp;us&nbsp;know.&nbsp;  
&nbsp;Thanks,&nbsp;  
&nbsp;Troy
