Sunday, April 27, 2014

How to use createLayer method calling MouseClick Event

The usage of createLayer is like the following example.
var layer2 = new ILayer();

 var hcols = "STRING_1,STRING_2,NUMBER_1,NUMBER_2".split(","); 

 var whereCondition = 'IL_ID=34'

 var labelColumn = 'POINT_ID'

 layer2.createLayer(ILayer.USER_POINT, "lyr_2", whereCondition,
 null, 'M.PIN_1', true, mouseClick, labelColumn, null, hcols);
ILayer.USER_POINT is explained at

Moreover, the function of mouseClick is detailed below.
function mouseClick(pos, info) {

  var html = '';

   html += '  ';

   for( var i = 0; i <; i++ ) {

     var data =[i];

     var color = "#ffffff";

     if( (i & 1) != 0 ) color = "#ffffff";

     html += '  ';

   } // for()

 html += '
ID' + + '
' + + '' + data.value + '
'; mapper.displayInfoWindow(pos.y, pos.x, html, 240, 100, "Bilgi: " +; return; } // mouseClick()

For more detailed information and questions, do not hesitate to contact to us.

Wednesday, March 7, 2012

"Request string is too long" Error Using Coloring Analysis

The request string for creating a Coloring Analysis is indeed very long compared to other features. That's why you get this error only when you make a Coloring Analysis request.
The reason that you get this error is, your application is running on a domain that is different from the domain LocationBox is running on. In order to solve this, you should configure a proxy on your server. You will find the directions for configuring proxy on Apache Tomcat and IIS servers.

Apache Tomcat

1. Open the httpd.conf file and uncomment the following lines.

   LoadModule proxy_http_module modules/
  LoadModule proxy_module modules/

2. Add the following lines to httpd.conf
<IfModule mod_proxy.c>
  ProxyRequests Off
<proxy *>
  Order deny,allow
  Deny from
  Allow from all
  ProxyPass /mapviewer
  ProxyPassReverse /mapviewer
3. Restart Tomcat.

4. Try accessing //localhost/mapviewer (include the port if Tomcat is not using port 80 (ie. //localhost:xxx/mapviewer)


1. Install ISAPI_Rewrite to use the proxy service. You can download ISAPI_Rewrite from here:

(Note: The Lite version of ISAPI_Rewrite does not have proxy support.)

2. Open ISAPI_Rewrite Manager and click "Edit" on configuration section.

3. Paste the following text to the editor.

# Helicon ISAPI_Rewrite configuration file
# Version

RewriteEngine On
RewriteCompatibility2 On
RepeatLimit 32
# unsupported directive: [ISAPI_Rewrite]

#  3600 = 1 hour
# unsupported directive: CacheClockRate 3600

#  Block external access to the httpd.ini and httpd.parse.errors files
RewriteRule ^/httpd(?:\.ini|\.parse\.errors).*$ / [NC,F,O]
#  Block external access to the Helper ISAPI Extension
RewriteRule ^.*\.isrwhlp$ / [NC,F,O]

RewriteProxy ^/mapviewer(.+)$ http\://$1 [NC]

4. Click "Apply" on configuration section.

5. Try accessing //localhost/mapviewer/ . Make sure that you add "/" at the end of your test url. (Include the port if Tomcat is not using port 80. ie. //localhost:xxx/mapviewer/)