Version 4 (modified by euzuro, 7 years ago)

add info on how to make a map with no controls

Frequently Asked Questions about the OpenLayers project


Table of Contents:


General

What is MetaCarta's relationship to the OpenLayers project?

OpenLayers is an independent project sponsored by  MetaCarta. MetaCarta uses the OpenLayers library in some of its products.

How can I add a question to this FAQ?

Please feel free to add OpenLayers questions to this page--we'll try to answer them for you.

Where do I find more info?

Here on this wiki. Click on the [TitleIndex] to see a list of available pages.



TRAC

How do I edit the wiki or a ticket?

You will need a wiki account. If you want an account to enable you to edit the wiki, add a ticket or modify an existing ticket please send an email to the Developer Mailing List.



Controls

How do I make an OpenLayers map without any controls?

Pass an empty array as the 'controls' property when initializing the map.

            map = new OpenLayers.Map( $('map'), {controls: [] } );




WFS

Why isn't WFS working on my local checkout of OpenLayers?

This is probably because you do not have a proxy host set up.

Due to security restrictions in Javascript, it is not possible to retrieve information from remote domains via XMLHttpRequest. The way to work around this is to set up a local script which can 'proxy' information from the remote host. An example script to do this is available from the examples directory as proxy.cgi:

 http://svn.openlayers.org/trunk/openlayers/examples/proxy.cgi

To use WFS results from a remote host on your machine, you must install a proxy script somewhere web accessible from the domain you plan to use to host your page. You must then edit ProxyHost to match that URL: an example URL for most Apache configurations might be:

OpenLayers.ProxyHost="/cgi-bin/proxy.cgi?url=";

If the ProxyHost is not set, requests are sent directly. In most cases, the result will be a security exception.