tag:blogger.com,1999:blog-13645774063882356662024-02-19T00:20:56.997-08:00LocationBox: The Location ToolboxLocationBoxhttp://www.blogger.com/profile/04917111482845254682noreply@blogger.comBlogger3125tag:blogger.com,1999:blog-1364577406388235666.post-55929011859444017512014-04-27T23:13:00.001-07:002014-04-27T23:33:15.733-07:00How to use createLayer method calling MouseClick Event<br />
The usage of <a href="http://www.locationbox.com.tr/web/jsdoc/symbols/ILayer.html#createLayer" target="_blank">createLayer</a> is like the following example. <br />
<pre class="code" style="-webkit-text-stroke-width: 0px; border: 1px dashed rgb(204, 204, 204); color: black; display: block; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; padding: 8px; text-align: start; text-indent: 0px; text-transform: none; widows: auto; word-spacing: 0px;">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);</pre>
ILayer.USER_POINT is explained at <a href="http://www.locationbox.com.tr/web/api_adduserpoint.jsp">http://www.locationbox.com.tr/web/api_adduserpoint.jsp</a><br />
<br class="Apple-interchange-newline" />
Moreover, the function of mouseClick is detailed below.<br />
<div style="text-align: left;">
<pre class="code" style="border: 1px dashed rgb(204, 204, 204); color: black; display: block; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; padding: 8px; text-indent: 0px; text-transform: none; word-spacing: 0px;">function mouseClick(pos, info) {
var html = '';
html += ' ';
for( var i = 0; i < info.data.length; i++ ) {
var data = info.data[i];
var color = "#ffffff";
if( (i & 1) != 0 ) color = "#ffffff";
html += ' ';
} // for()
html += '<table border="0" style="height: 100%px; margin-left: 0px; margin-right: auto; text-align: left; width: 100%px;"><tbody>
<tr bgcolor="#ffffff"><td>ID</td><td>' + info.id + '</td></tr>
<tr bgcolor="#ffffff"><td>' + data.name + '</td><td>' + data.value + '</td></tr>
</tbody></table>
';
mapper.displayInfoWindow(pos.y, pos.x, html, 240, 100,
"Bilgi: " + info.id);
return;
} // mouseClick()</pre>
</div>
<br class="Apple-interchange-newline" />
For more detailed information and questions, do not hesitate to <a href="http://www.locationbox.com.tr/web/contact.jsp" target="_blank">contact</a> to us.<br />
<br class="Apple-interchange-newline" />LocationBoxhttp://www.blogger.com/profile/04917111482845254682noreply@blogger.com0tag:blogger.com,1999:blog-1364577406388235666.post-16512872117790156642012-03-07T04:31:00.003-08:002012-03-09T02:10:27.609-08:00"Request string is too long" Error Using Coloring AnalysisThe 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. <br />
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.<br />
<br />
<strong>Apache Tomcat</strong><br />
<br />
1. Open the httpd.conf file and uncomment the following lines.<br />
<br />
<span style="color: #134f5c; font-family: "Courier New", Courier, monospace;">LoadModule proxy_http_module modules/mod_proxy_http.so<br />
LoadModule proxy_module modules/mod_proxy.so</span><br />
<br />
2. Add the following lines to <strong>httpd.conf</strong><br />
<blockquote class="tr_bq"><span style="color: #134f5c; font-family: "Courier New", Courier, monospace;"><IfModule mod_proxy.c></span><br />
<span style="color: #134f5c; font-family: "Courier New", Courier, monospace;"> ProxyRequests Off</span><br />
<span style="color: #134f5c; font-family: "Courier New", Courier, monospace;"><proxy *></span><br />
<span style="color: #134f5c; font-family: "Courier New", Courier, monospace;"> Order deny,allow</span><br />
<span style="color: #134f5c; font-family: "Courier New", Courier, monospace;"> Deny from 127.0.0.1</span><br />
<span style="color: #134f5c; font-family: "Courier New", Courier, monospace;"> Allow from all</span><br />
<span style="color: #134f5c; font-family: "Courier New", Courier, monospace;"></proxy></span><br />
<span style="color: #134f5c; font-family: "Courier New", Courier, monospace;"> ProxyPass /mapviewer </span><a href="http://www.locationbox.com.tr/mapviewer"><span style="color: #134f5c; font-family: "Courier New", Courier, monospace;">http://www.locationbox.com.tr/mapviewer</span></a><br />
<span style="color: #134f5c; font-family: "Courier New", Courier, monospace;"> ProxyPassReverse /mapviewer </span><a href="http://www.locationbox.com.tr/mapviewer"><span style="color: #134f5c; font-family: "Courier New", Courier, monospace;">http://www.locationbox.com.tr/mapviewer</span></a><br />
<span style="color: #134f5c; font-family: "Courier New", Courier, monospace;"></IfModule></span></blockquote>3. Restart Tomcat. <br />
<br />
4. Try accessing <span style="color: #4c1130;"><strong>//localhost/mapviewer</strong></span> (include the port if Tomcat is not using port 80 (ie. //localhost:xxx/mapviewer)<br />
<br />
<strong>IIS</strong><br />
<br />
1. Install <strong>ISAPI_Rewrite</strong> to use the proxy service. You can download <strong>ISAPI_Rewrite</strong> from here:<br />
<br />
<a href="http://www.helicontech.com/download-isapi_rewrite3.htm">http://www.helicontech.com/download-isapi_rewrite3.htm</a><br />
<br />
(Note: The Lite version of <strong>ISAPI_Rewrite</strong> does not have proxy support.)<br />
<br />
2. Open ISAPI_Rewrite Manager and click "Edit" on configuration section.<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiq8XkFYEHL0nD8tSo-lohungy5jpiMLA5gz28hD23StkWNywjG2NIk4zs5e1uafQ97cTar6GafIJ5cwkAZl16CAAqRom_0KLOV6eOQoeRnhDNn2UemZlhlyXGS6aRoXNH_NGAFqvOI9lM/s1600/iis_proxy_1.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="409" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiq8XkFYEHL0nD8tSo-lohungy5jpiMLA5gz28hD23StkWNywjG2NIk4zs5e1uafQ97cTar6GafIJ5cwkAZl16CAAqRom_0KLOV6eOQoeRnhDNn2UemZlhlyXGS6aRoXNH_NGAFqvOI9lM/s640/iis_proxy_1.JPG" width="640" yda="true" /></a></div><br />
3. Paste the following text to the editor.<br />
<br />
<span style="color: blue; font-family: "Courier New", Courier, monospace;"># Helicon ISAPI_Rewrite configuration file<br />
# Version 3.1.0.88</span><br />
<span style="color: blue; font-family: "Courier New", Courier, monospace;">RewriteEngine On<br />
RewriteCompatibility2 On<br />
RepeatLimit 32<br />
RewriteBase <br />
# unsupported directive: [ISAPI_Rewrite]</span><br />
<span style="color: blue; font-family: "Courier New", Courier, monospace;"># 3600 = 1 hour<br />
# unsupported directive: CacheClockRate 3600</span><br />
<span style="color: blue; font-family: "Courier New", Courier, monospace;"># Block external access to the httpd.ini and httpd.parse.errors files<br />
RewriteRule ^/httpd(?:\.ini|\.parse\.errors).*$ / [NC,F,O]<br />
# Block external access to the Helper ISAPI Extension<br />
RewriteRule ^.*\.isrwhlp$ / [NC,F,O]</span><br />
<span style="color: blue; font-family: "Courier New", Courier, monospace;">RewriteProxy ^/mapviewer(.+)$ http\://www.locationbox.com.tr/mapviewer$1 [NC]</span><br />
<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiDGzL2nOiYPkhmDZuHEa-7_xsxdVpw3BbNT6zCQh1z4h6NhewomqLbicIyhZ7lOo1uuZPuH40RXyNuxy0MUIM54ycAYakW_UfqZ49Lo5YxCDN45GdPC-HDrKrYwe4YXISmPWsz0MYR-wI/s1600/iis_proxy_3.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="410" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiDGzL2nOiYPkhmDZuHEa-7_xsxdVpw3BbNT6zCQh1z4h6NhewomqLbicIyhZ7lOo1uuZPuH40RXyNuxy0MUIM54ycAYakW_UfqZ49Lo5YxCDN45GdPC-HDrKrYwe4YXISmPWsz0MYR-wI/s640/iis_proxy_3.JPG" width="640" yda="true" /></a></div><br />
4. Click "Apply" on configuration section.<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiDGzL2nOiYPkhmDZuHEa-7_xsxdVpw3BbNT6zCQh1z4h6NhewomqLbicIyhZ7lOo1uuZPuH40RXyNuxy0MUIM54ycAYakW_UfqZ49Lo5YxCDN45GdPC-HDrKrYwe4YXISmPWsz0MYR-wI/s1600/iis_proxy_3.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="410" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiDGzL2nOiYPkhmDZuHEa-7_xsxdVpw3BbNT6zCQh1z4h6NhewomqLbicIyhZ7lOo1uuZPuH40RXyNuxy0MUIM54ycAYakW_UfqZ49Lo5YxCDN45GdPC-HDrKrYwe4YXISmPWsz0MYR-wI/s640/iis_proxy_3.JPG" width="640" yda="true" /></a></div><br />
<div class="separator" style="clear: both; text-align: center;"></div>5. Try accessing <span style="color: #4c1130;"><strong>//localhost/mapviewer/</strong></span> . 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/)LocationBoxhttp://www.blogger.com/profile/04917111482845254682noreply@blogger.com0tag:blogger.com,1999:blog-1364577406388235666.post-81138641479823977882011-01-07T08:01:00.001-08:002011-01-07T08:01:42.022-08:00LocatePostposty postLocationBoxhttp://www.blogger.com/profile/04917111482845254682noreply@blogger.com0