Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7998035
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T15:07:01+00:00 2026-06-04T15:07:01+00:00

I have problems with this line, OpenLayers.ProxyHost = proxy.cgi?url=; What should do other than

  • 0

I have problems with this line,
OpenLayers.ProxyHost = “proxy.cgi?url=”;

What should do other than writing above line in open layer code set?

My information
I try to get feature information of WMS image using WMSGetFeatureInfo command.I am using openlayer 2.10 ,geoserver and apache-tomcat-6.0.35.I can run tomcat using localhost:8080 and geoserver using localhost:8080/geoserver.

I am new to open layer and i see Frequently Asked Questions about the OpenLayers project but still can’t figure out the answer.Yours any answers are very help full for me?

Thanks for your valuable time.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T15:07:02+00:00Added an answer on June 4, 2026 at 3:07 pm

    This link could be useful: Openlayers Proxy path usage

    Some of the tasks that OpenLayers performs (including WFS requests) require the use of a proxy script because of restrictions in JavaScript on the use of XMLHTTPRequest making requests to remote servers.
    Add that specific declaration before setting the map.

    Start from here:
    http://openlayers.org/dev/examples/2

    Example of code:

        /*
         * Fix for OpenLayers using 900913 for web mercator and AGS using 102113 (it must run before map init)
        OpenLayers.Layer.WMS.prototype.getFullRequestString = function(newParams,altUrl) {
            try {
                var projectionCode=typeof this.options.projection == 'undefined' ? this.map.getProjection() : this.options.projection;
            } catch(err){
                var projectionCode=this.map.getProjection();
            }
            this.params.SRS = projectionCode=="none" ? null : projectionCode;
            return OpenLayers.Layer.Grid.prototype.getFullRequestString.apply(this,arguments);
        }
    
    */
    
        OpenLayers.ProxyHost = proxyPath;
    
        var options = {
            projection: mercator, //EPSG:3785/900913
            displayProjection: geographic, //EPSG:4326
            theme: null,
            maxExtent: new OpenLayers.Bounds(-20037508.34, -20037508.34, 20037508.34, 20037508.34),
            maxResolution: 156543.0339,
            units: 'm',
            controls: [],
            numZoomLevels: MAX_ZOOM_LEVEL,
            allOverlays: true
        };
        OpenLayers.Util.DEFAULT_PRECISION = 18;
    
        mp = new OpenLayers.Map('map', options);
        addMaps();
        addControls();
        mp.addLayers([googlePhysical, googleSatellite, googleStreets, googleHybrid]);
        //Enabling the preferred layers with a delay of 450 to be able to load the external backgrounds
        setTimeout(setInitialLayersDiv, 450);
    
        if (!mp.getCenter()) {
            if (document.getElementById('userMapExtent').value != '') {
                var sExtent = document.getElementById('userMapExtent').value.split(',');
                mp.zoomToExtent(new OpenLayers.Bounds(sExtent[0], sExtent[1], sExtent[2], sExtent[3]), true);
            } else {
                mp.zoomToExtent(europeGoogleExtent);
            }
        }
        J('#google_loading').hide('slow');
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm having problems with the NetBeans Nodes API. I have this line of code:
I have problems with the following bit of javascript/jquery code: this.droppable = function(){ $('.imageWindow
I have problems running a dynamic LIKE statement in my project: this query works
I have had a few problems getting this right, so I wanted to ask
I have a following problems with eclipse, when I installed ClearCase plugin from this
I am having some problems figuring out this issue. I have a server that
I have a jar on the classpath which contains a hibernate.properties. This causes problems
I have a few thoughts on this but I can see problems with both.
I'm training code problems like UvA and I have this one in which I
I'm curious how others have solved this problem, and what problems might lurk behind

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.