leaflet-spectrum-spatial

0.4.9 • Public • Published

Spectrum4Leaflet

Leaflet plugin for Spectrum Spatial server.

What is it

This javascript API helps to you work with Spectrum Spatial server services in Leaflet maps. This API contains base rest-service wrappers, layers for Leaflet maps and controls. Spectrum4Leaflet sample

What is inside

Service wrappers

  • MapService - all rest operations of map service
  • TileService - all rest operations of tile service
  • FeatureService - all rest operations of feature service
  • NamedResourceService - all soap operations of feature service
  • GeometryService - all soap operations of geometry service
  • RoutingService - rest operations of enterprise routing module

Layers

  • MapServiceLayer - simple map layer object for Leaflet map
  • TileServiceLayer - tile layer object for Leaflet map

Controls

  • Layers - extended Leaflet Layers control, can change layer's zIndex, opacity and show legend
  • Legend - simple legend for MapServiceLayer
  • Feature - now has only one function - "search by point" in specified table of feature service
  • Resources - lists resources from named resource service

Using

In your html add reference on leaflet (dev version) and on Spectrum4Leaflet plugin and write down something like:

var mapServiceUrl = 'http://localhost:8080/rest/Spatial/MappingService';
var mapName = '/Samples/NamedMaps/MapWithLayer';
 
var map = L.map('map').setView([0, 0], 1);
 
L.SpectrumSpatial.Layers.mapServiceLayer(
    L.SpectrumSpatial.Services.mapService(mapServiceUrl),
    mapName
).addTo(map);

/leaflet-spectrum-spatial/

    Package Sidebar

    Install

    npm i leaflet-spectrum-spatial

    Weekly Downloads

    1

    Version

    0.4.9

    License

    Apache-2.0

    Unpacked Size

    382 kB

    Total Files

    45

    Last publish

    Collaborators

    • skarppion101