Giter Club home page Giter Club logo

allocs-webmap-for-cpm's Introduction

Allocs Webmap for CPM

Patched map.js for using CPM WebApis.

A20 and lower: Replace map.js in /Mods/Allocs_WebAndMapRendering/webserver/js

A21 and higher: Replace map.js in /Mods/Allocs_WebAndMapRendering/webserver_legacy/js

To configure connection to CPM's WebAPI, make sure the port CPM's WebUI is running on, is filled in map.js (first line) with 'var cpmWebUiPort = 11111;'

Requires permission level 2000 for the specific api's in cpmcc_permissions.xml or you can create apiuser(s) for validated access to any of the apis, to be able to let them show in allocs webmap. Set permission lower than 2000 or dont have apiuser access and the layers will not show on allocs webmap.

<?xml version="1.0" encoding="UTF-8"?>
<cpmcc_permissions>
	<apiusers>
		 <!-- <apiuser username="apiuser1" password="password1" permission_level="0" /> -->
	</apiusers>
	<permissions>
		<permission module="cpmcc.map" permission_level="0" />
		<permission module="cpmcc.createadvclaims" permission_level="0" />
		<permission module="cpmcc.getlandclaims" permission_level="0" />
		<permission module="cpmcc.getadvclaims" permission_level="0" />
		<permission module="cpmcc.getresetregions" permission_level="0" />
		<permission module="cpmcc.getplayerhomes" permission_level="0" />
		<permission module="cpmcc.getplayersonline" permission_level="0" />
		<permission module="cpmcc.getquestpois" permission_level="2000" />
		<permission module="cpmcc.getallpois" permission_level="2000" />
		<permission module="cpmcc.gettraders" permission_level="2000" />
		<permission module="cpmcc.getvehicles" permission_level="2000" />
	</permissions>
</cpmcc_permissions>

For accessing the apis via api user, configure one or multiple apiusers in cpmcc_permissions.xml and add:

?apiuser=apiuser1&password=password1

after the api call of your choice in map.js.

To disable/enable CPM checkboxes on allocs webmap (comment or uncomment) look for the code between:

// CPM Checkboxes -->
.......
// <-- CPM Checkboxes

The actual layer code for CPM layers can be found between:

//CPM Layers -->
.......
// <-- CPM Layers

This version contains checkboxes and layers for:

  • Reset Regions
  • Traders
  • Vehicles
  • All POI's
  • Quest POI's
  • Quest POI's with bed/lcb (shielded behind viewlandclaims permission(allocs))
  • All CPM's advanced claims (15) (shielded behind viewallclaims permission(allocs))
  • Player beds (shielded behind viewallclaims permission(allocs))

allocs-webmap-for-cpm's People

Contributors

prisma501 avatar

Stargazers

 avatar

Watchers

 avatar  avatar

allocs-webmap-for-cpm's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.