Spectrum Spatial (SSA/LIM)

 View Only
  • 1.  Capture lat/long on Click Event

    Posted 24 days ago
    We are using the Google API. We would like to switch to SSA. In the current solution, using Google, we programmatically set a marker at a lat/long and listen for 'click' and 'mousemove' events (see below). How can we do this using the SSA API?



    ------------------------------
    John Chapman
    Southern Farm Bureau Casualty Ins
    Cayce SC
    ------------------------------


  • 2.  RE: Capture lat/long on Click Event

    Posted 19 days ago
    Hi John,

    If you want to extend SSA you will need to use extensibility
    https://docs.precisely.com/docs/sftw/analyst/22.1/en/pdf/analyst-v2022-1-extensibility-guide.pdf

    SSA uses OpenLayers for the map so this is what you will need to interact with.

    Here are a few things you will need to do (note this is incomplete)
    // import map service
    import { MapService } from 'src/app/pb-maps/services/map.service';
    
    // add to constructor
    constructor(
    	private mapService: MapService
    }
    
    // interact with map
    ngOnInit() {
    	const map = this.mapService.getMap();
    	map.on('singleclick', <do something>);
    	map.on("pointerdrag", <do something>);
    }
    See OpenLayers doco for more info https://openlayers.org/en/latest/apidoc/module-ol_Map-Map.html#on

    ------------------------------
    Duri Bradshaw
    Spatial IT Consultant
    Insight GIS
    ------------------------------



  • 3.  RE: Capture lat/long on Click Event

    Posted 18 days ago
    Thank you. That points me in the right direction.

    ------------------------------
    John Chapman
    Southern Farm Bureau Casualty Ins
    Cayce SC
    ------------------------------