JMap Server Lima
English
English
  • Welcome to JMap Server Lima
  • Administrator
    • JMap Server Administrator Manual
      • Introduction
        • Quick Start Guide
        • User Interface
          • Old User Interface
      • Resources: Databases
        • Creating Databases
        • Configuring Databases
          • Database Permissions
        • Managing Databases
        • JMap Server System Database
      • Resources: JMap Server to JMap Server Connections
        • Creating Connections to JMap Server
        • Configuring JMap Server to JMap Server Connections
          • Permissions for the Remote Connection
        • Managing Connections
      • Resources: Spatial Data
        • Basic Concepts
        • Creating Spatial Data Sources
        • Configuring Spatial Data Sources
          • Spatial Data Source Permissions
          • External Attributes
          • Metadata
          • Sharing Spatial Data Sources
        • Managing Spatial Data Sources
        • Vector Data Sources
          • JMap ADF - E00 Arc - Info reader
          • JMap CSV reader
          • JMap DGN V7 - V8 File reader
          • JMap DWG - DXF reader
          • JMap EDIGEO reader
          • JMap File geodatabase reader
          • JMap GeoJSON reader
          • JMap GML reader
          • JMap GPX reader
          • JMap IFC reader
          • JMap KML reader
          • JMap MID - MIF reader
          • JMap Photo reader
          • JMap SHP reader
          • JMap TAB reader
          • Annotations in a database
          • ArcGIS REST
          • ArcSDE geodatabase
          • Coordinates in a database
          • Enterprise geodatabase
          • JMap Server
          • JMap Spatial Table
          • MongoDB
          • MySQL Spatial
          • OGC API Features
          • Oracle Spatial Locator
          • Personal geodatabase
          • PostGIS
          • SQL Server Spatial
          • WFS Server
          • WKB or WKT in a database
        • Raster Data Sources
          • ECW - JPG2000
          • GDAL - Geospatial Data Abstraction Library
          • ArcGIS REST
          • JMap Server
          • OpenStreetMap
          • WMS server
          • WMTS Server
      • Resources: Metadata templates
      • Resources: Projects
        • Creating Projects
          • Multilingual Projects
          • Vector tiles in JMap
        • Configuring Projects
          • Project Permissions
          • Managing Layers
            • Organizing Layers
          • Attribute Queries
            • Attribute Query Forms
          • Image Producer
          • JMap Extensions Compatible with JMap NG or JMap Survey
        • Sharing the Project
        • Managing Projects
      • Resources: Style Templates
        • Creating Style Templates
        • Managing Style Templates
      • Resources: Personal Layers
      • Resources: Layers
        • Creating Layers
        • Configuring Layers
          • Layer Permissions
          • General Settings
          • Dynamic Filters
          • Style
          • Thematics
          • Labels
          • Mouseover
          • Information Reports
          • Forms
            • Configuring Forms
            • Creating Forms
              • Layer Attributes Forms
              • Database Forms
          • JMap Extensions
        • Sharing Layers
      • JMap Server Applications
        • Deployment: Classical JMap applications
          • JMap Pro Applications
          • JMap Web Applications
            • Using a GeoWebCache Server
          • WFS and WMS Services
          • Managing Deployed Applications
          • Downloading Services
        • New generation JMap applications
      • Tools
        • SQL Console
        • Import / Export
          • User Data
        • Scheduler
        • Messaging
        • Debugging tools
      • JMap Server Extensions
        • Installed Extensions
        • Marketplace
      • JMap Server
        • JMap Server Status
        • Sessions
        • Security
          • Users and Groups
            • User Managers
              • JMap DB user manager
              • Composite user manager
              • Active Directory user manager
              • JMap LDAP user manager
              • OpenID Connect (OIDC) user manager
              • SAML2 user manager
            • Single Sign-On for JMap Pro
          • Managing Permissions
          • Using HTTPS with JMap
        • Log Files
        • Usage Statistics
        • JMap Server Settings
    • Technical Specifications
    • Installation Guide
    • Installing and Starting JMap Server (with installer)
    • Installing and Starting JMap Server (in a Docker container)
    • Migration Guide to JMap Server Lima
  • Applications
    • JMap Server Applications
    • JMap Pro User Guide
      • Introduction
        • User Interface
        • Navigating on the Map
        • Map Management
        • Map Settings
      • Map Layers
        • Layer Management
        • Elements Explorer
        • Thematic Maps
        • Layer Metadata
        • Layer Settings
          • General
          • Style
          • Thematics
          • Labeling
          • Mouseover
          • Filters
          • Advanced
        • Editable Layers
          • Editing Data
          • Personal Layers
      • Tools
        • Labeling
        • Interactive Selection
        • Information
          • Information Report
          • Geometry Information
          • Mouseover
        • Snap
        • Measurement
        • Search Tools
          • Attribute Queries
          • Spatial Queries
        • Collaboration Tools
          • Map Contexts
          • Sharing Maps
          • Printing Maps
      • Application Settings
      • Keyboard and Mouse Shortcuts
    • JMap NG User Guide
      • Introduction
        • Connecting to JMap NG
        • User Interface
        • Navigating on the Map
        • Profile and User Settings
      • The Data
        • The Layers Panel
        • Data Layers
          • Displaying Layers
          • Thematics
          • Layer Information
          • Geographic Extent of the Layer
          • Filter Elements on the Map
          • Making Layer Elements Selectable
      • I Wish to...
        • Display Element Information
          • Tooltips
          • Information Reports
        • Perform Searches
        • Select Elements on the Map
        • Measure Distances and Surfaces
        • Add Annotations to the Map
        • Edit Data
        • Create and Manage Customized Maps
        • Export / Print a Map
    • JMap Survey User Guide
      • Introduction
        • Working With an iOS Device
        • Working With an Android Device
        • Logging In
        • User Interface
      • The Data
      • I Wish to...
        • Access Information Associated With an Object
        • Perform Searches
        • Create Objects
        • Modify Objects
        • Work in Offline Mode
        • Synchronize Data with JMap Server
        • Log Out
    • JMap Web
      • JMap Web User Guide
  • Extensions
    • Edition
      • User Interface
      • Basic Concepts
      • I Wish to...
        • Edit Layers Geometries
          • Edition Tools
          • Selecting Elements
          • Node and Polygon Operations
          • Vertical Position and Element Duplication
          • WKT Geometries
        • Perform Spatial Operations
          • Geoprocessing
          • Spatial Tools
    • Export
    • Import
      • Importation Procedure
        • Importing MIF Files
        • Importing SHP Files
        • Importing CSV Files
        • Importing NMEA Data
        • Importing Data From WMS
    • Documents
      • Configuring JMap Documents
        • Selecting Data Sources to Associate Documents with
        • Configuring Document Depots
        • Managing repositories
        • Making Documents available in apps
      • Documents for JMap Pro
        • Graphical Interface
        • Associating Documents with Map Elements
        • Searching for Documents
        • Displaying the List of Documents Associated with Elements
      • Documents for JMap NG
        • Graphical Interface
        • Searching for Documents
        • Showing Selected Documents
      • Documents for JMap Survey
    • Tracking
      • Administrator
      • User
    • JMap NG Configuration
      • Configuration
  • Developer
    • JMap Server REST API
    • JMap Admin REST API
    • JMap Pro / Server API
    • JMap Web API
    • JMap Server SDK
    • JMap NG Developer Manual
      • Startup Options
      • Extensions
      • Examples
        • Start the JMap NG Core library
        • Start the JMap NG App
        • Add a JMap NG App extension
        • Toggle a JMap layer visibility
        • Add a layer to display custom data from GeoJSON file
        • Locate and select features by attribute query
        • Add an event on move end
        • Add attributions on the map
        • Locate and select feature by id
        • Locate and select feature(s) by location
        • Custom mouseover on a layer
        • Create a custom form in a div
      • Changelog
  • Knowledge Base
    • Knowledge Base
Propulsé par GitBook

K2 Geospatial 2024

Sur cette page
  • JMap NG Core
  • Core options
  • Core Map options
  • JMap NG App
Exporter en PDF
  1. Developer
  2. JMap NG Developer Manual

Startup Options

You can provide startup options to the JMap NG Core library or the JMap NG App.

Those options let you customize the behaviour of JMap NG at startup.

You can pass those options as URL parameters:

https://jmapdoc.jmaponline.net/services/ng/?ngProjectId=36

Or pass them as a JS object, through a globally scoped JS variable named JMAP_OPTIONS, like this:

<script type="text/javascript">
    window.JMAP_OPTIONS = {
    projectId: 1,
    restBaseUrl: "https://jmapdoc.jmaponline.net/services/rest/v2.0",
    anonymous: true,
    map: {
      containerId: "my-custom-map",
      zoom: 9.757829447748511,
      center: {
        x: -73.60243569463414,
        y: 45.504533166207324
      },
      scaleControlVisible: true,
      scaleControlPosition: "top-right"
    }
  }
</script>

All options are available as JS parameters, and some are also available as URL parameters. All URL query parameters are prefixed with "ng", to avoid naming collisions with eventual third-party query parameters (especially true if JMap NG is embeded in a div for instance).

JMap NG Core

The following tables present the list of JMap NG Core library's startup options:

Core options

Option

Description

JavaScript Example

URL Parameter Example

Value

Login as anonymous user

anonymous: true

ngAnonymous=true

true | false

Default Basemap Id

defaultBasemapId: "mapbox-satellite-streets"

ngDefaultBasemapId=mapbox-satellite-streets

string

Disable Basemaps

disableBasemaps: true

ngDisableBasemaps= true

true | false

Disable project change

disableProjectChange: true

ngDisableProjectChange= true

true | false

Extensions

{ extensions: [ … ] }

-

json / javascript

Extensions overrides

{ extensionsUrlOverride: [ … ] }

-

json

Enable/Disable Geolocation

geolocationEnabled: false

ngGeolocationEnabled =false

true | false

Disable UI visibility

hideMainLayout: true

-

true | false

Session language

locale: “en“

ngLocale=fr

string

Project thumbnails

loadProjectThumbnails: true

-

boolean

Project id

projectId: 12

ngProjectId=12

number

Project name

projectName: “World“

ngProjectName=The world url encoded => ngProjectName=World

string

Projects loaded callback

onProjectsChange: (params) => console.log( params.projects )

-

javascript function() => void

Rest API URL

restBaseUrl: “http://your-server/services/rest/v2.0“

-

string

Session token

token: “123456789“

ngToken=123456789

number

Core Map options

Map options are gathered in a "map" json object in the javascript configuration.

Option

Description

JavaScript Example

URL Parameter Example

Value

Map initial bearing

map: { bearing: 90 }

ngBearing=90

number

Center

map: { center: { x: 12.4, y: 45.34 } }

-

json

Html container id

map: { containerId: “my-div“ }

-

string

Extent

map: { extent: { sw: { x: 12.4, y: 45.34 }, ne: { x: 24.4, y: 55.34} } }

ngExtent=12.48|45.34 |24.4|55.34 url encoded => ngExtent=12.48%7C45.34 %7C24.4%7C55.34

json | string

Rotation control

map: { mapRotation ControlVisible: true }

ngMapRotationControl Visible=false

true | false

Google Maps Api Key

map: { googleMapsApiKey: “Bse….32k“ }

-

string

Mapbox token

map: { mapboxToken: “xgb….4f5“ }

-

string

Navigation history control visibility

map: { navigationHistory ControlVisible: true }

ngNavigationHistory ControlVisible=true

true | false

Map ready callback

map: { onStartupMapReadyFn: map => { console.log(“The map is ready“, map) } }

-

javascript function(map: mapboxgl.Map) => void

Map initial rotation

map: { rotation: 45 }

ngRotation=45

number

Scale-control position

map: { scaleControlPosition: “bottom-right“ }

-

“top-left” | “top-right” | “bottom-right” | “bottom-left”

Scale-control unit

map: { scaleControlUnit: “imperial“ }

-

imperial | metric | nautical

Scale-control visibility

map: { scaleControlVisible: true }

-

true | false

Search

map:{ search: { layerId: 2, attributeName: “PEC“, attributeValue: [“RT 201“, "RT 202"], showMapPopup: true } }

ngSearch=showMapPopup |2|PEC|RT 201|RT 202 url encoded => ngSearch=showMapPopup %7C2%7CPEC %7CRT%20201 %7CRT%20202

json | string

Zoom level

map: { zoom: 5.3456 }

-

number

JMap NG App

The following table presents the list of JMap NG App's startup options:

Option

Description

JavaScript Example

URL Parameter Example

Value

Div container id

application: { containerId: “my-app“, … }

-

string

Disable panels

application: { disabledPanels: [ “print“, “mapcontext“ ], … }

ngDisabledPanels= print,mapcontext

Array | string

Extensions

application: { extensions: [ … ] }

-

json / javascript

Login screen background image

application: { loginBackgroundImageUrl: “http://my-server/my-image“, … }

-

string

Logo image

application: { logoImageUrl: “http://my-server/my-image“, … }

-

string

App loaded callback

application: { onAppLoad: () => console.log(“App is loaded“), … }

-

javascript function() => void

App unloaded callback

application: { onAppUnload: () => console.log(“App is not loaded anymore“), … }

-

javascript function() => void

Display a panel

application: { panel: “query“, … }

ngPanel= selection

"layer" | "selection" | "measure" | "mapcontext"| "print" | "user" | "query" | "annotation" | "geometry"

Project list background image

application: { projectBackgroundImageUrl: “http://my-server/my-image“, … }

-

string

Initial side panel visibility

application: { sidePanelInitialVisibility: false, … }

ngSidePanelInitialVisibility= false

true | false

Theme

application: { theme: “light“, … }

ngTheme=light

light | dark

PrécédentJMap NG Developer ManualSuivantExtensions

Dernière mise à jour il y a 11 mois

If true, the lib will try to log in as an anonymous user. ()

If set, will use the basemap id as default basemap when loading a project. Using "none" will disable any default basemap.()

If true, no basemap will be available/displayed. In JMap NG App, no basemap panel will be displayed in the left panel. ()

If true, changing project (after one has been loaded) will be disabled. ()

You can provide your own Core extensions. ()

During the development of a project extension, you can use this option to load your local code instead of the project's extension's jsUrl. ()

By default, the geolocation is activated (if the browser supports it). You can disable the geolocation by using this option. ()

If set to true, NG Core will not display a basic UI providing loading progress information, a login form and a project list. By default, this option is disabled in NG App. ()

If set to any of the locales supported by JMap NG, it will define the session locale, bypassing browser or user-defined locale. ()

If true will load all project thumbnails (base 64 images) asynchronously. ()

Id of the JMap project to open. ()

Name of the JMap project to open. If both a project id and a project name are provided, project id will be used. ()

You can provide some JS code to be executed when all project definitions have been loaded from the backend. ()

The Rest API URL of your JMap Server instance. Not used for JMap Cloud. ()

A JMap session token (aka sessionId). If valid, will be used to identify the user. Not used for JMap Cloud. ()

The initial bearing of the map (counterclockwise rotation). ()

Will center the map on the specified point. ()

You can place the map in the HTML div of your choice by identifying the div in the map parameter. If not set, a div is appended in the body root. ()

Will adjust the map to fit the extent. (sw = bbox south-west, ne = bbox north-east) ()

By default, the map rotation control is visible, but can be hidden with this parameter. ()

If no Google Maps API key is set in the JMap Cloud or JMap Server configuration, you can provide the API key as a JS parameter. The Google Maps API key is not mandatory, but if you don't provide one you won't have access to the Google Maps basemaps. ()

If no Mapbox access token is set in the JMap Cloud or JMap Server configuration, you can provide the token as a JS parameter. The Mapbox token is not mandatory, but if you don't provide one you won't have access to the Mapbox basemaps. ()

By default, the navigation history control is visible, but can be hidden with this parameter. ()

This function is triggered only once, the first time the map is loaded. ()

The initial rotation of the map (clockwise rotation). ()

The scale control position on the map. ()

The scale control unit. ()

By default, the scale control is visible, but can be hidden with this parameter. ()

When the map is loaded, will execute a search by attribute(s) on the layer, and zoom to the matching features. You can search using multiple attribute values by passing an array in the javascript form, or by passing trailing values in the URL form (). An optional parameter lets you specify to display a MouseOver popup on the result feature. This popup wil only be displayed if the showMapPopup parameter is true, and if there is only one result to the search. In the URL form, showMapPopup must be passed as a keyword, and at the beginning of the query string

The initial zoom level of the map. ()

You can choose the div where the application (and the map) will be rendered in your page. ()

Will disable (and hide) the specified panels. ()

You can provide your own application extensions . See the examples section for details. ()

You can set a custom background image for the login screen by setting an image url. This image will be displayed to the left of the JMap NG login form. ()

You can set a custom logo image by setting an image url. The logo will be displayed above the JMap NG login form. ()

You can provide JS code that will be executed when the app is ready. ()

You can provide JS code that will be executed when the app is unloaded. ()

Will show the specified panel at startup. ()

You can set a custom background image for the project list screen by setting an image url. This image will be displayed to the left of the project list. ()

Controls side panel initial visibility. ()

Will set the theme, dark or light. ()

api doc
api doc
api doc
api doc
api doc
api doc
api doc
api doc
api doc
api doc
api doc
api doc
api doc
api doc
api doc
api doc
api doc
api doc
api doc
api doc
api doc
api doc
api doc
api doc
api doc
api doc
api doc
api doc
api doc
api doc
api doc
api doc
api doc
api doc
api doc
api doc
api doc
api doc
api doc
api doc
api doc