Skip to content

Latest commit

 

History

History
67 lines (52 loc) · 2.04 KB

README.md

File metadata and controls

67 lines (52 loc) · 2.04 KB

ocmv

Configureable Map Viewer using OpenLayers 3. A map viewer based on CMV.

alt tag

###Supported Data Types:

  • WMS

###Current Widgets:

  • Bookmarks
  • Draw
  • Growler
  • Help
  • Home button
  • Identify popup
  • Measure
  • Locate button
  • Map info
  • Overview map
  • StreetView

###Upcoming Widgets:

  • Search
  • Attribute table
  • Edit
  • Print

###Client technology used:

###Proxy If you don't own or can't manage the server side to consume your WMS avoiding issues with Cross Origin requests - requests with different domain and/or port than your javascript application - you can setup a third party proxy app like this one.

Alternatively, you can enable cors on the software running GeoServer or others.

Once you have your proxy setted up, you can configure it on ocmv like this:

viewer.js

return {
    // used for debugging your app
    isDebug : true,
    
    ...

    proxy : {
        enabled : true,
        address : 'http://myserver.com/proxy/proxy.ashx?', // in this case, using DotNet proxy
        alwaysUseProxy : false,
        useProxyWhen : [/mygeoserver-dev:8080/ig, /mygeoserver-prod:8080/ig],
        usePHPHandlers : false
    },
    
    ...

Where:

  • enabled must be true if you wish to enable application's proxy handling;
  • address must be your proxy app address part, which will be concatenated with the actual URL;
  • alwaysUseProxy must be false if you wish that we proxy only URLs defined by you in the next attribute;
  • useProxyWhen must be an array of RegExp patterns that will define URLs to be proxied or not.
  • usePHPHandlers must be true if you wish to use ocmv's built-in PHP scripts ([ocmv folder]/proxy) to handle requests when necessary. It overrides any other proxy configuration except enabled, that still need to be true.

###Contributing

  • Pull requests