Questions tagged [typescript]

TypeScript is a typed superset of JavaScript that compiles to plain JavaScript

15 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
2
votes
0answers
412 views

Openlayers 4 - Load WMS image source require authentication

I try to load WMS image layer with openlayers 4.6 and angular 5, the code is: const syr_layer = new ol_layer_Image({ source: new ol_source_ImageWMS({ url: 'serverurl', crossOrigin: 'anonymous'...
2
votes
0answers
1k views

OpenLayers and Ionic 3 | tileLoadFunction not working

I am building a simple map app with the Ionic 3 framework. I am using OpenLayers 4.0.2 as the map api. It has been going great until I tried implementing a custom tileLoadFunction for the basemap ...
1
vote
0answers
52 views

Add custom types typescript 3

The current behavior: I migrated from @types/openlayers": "4.6.17" to "@types/ol": "5.3.6" and I don't find the function getVectorContext(event) in ol/render so I added it manually to render.d.ts but ...
1
vote
0answers
97 views

Draw and GeometryFunction (OL5 - Typescript)

I'm trying to update my OL3 code (javascript) in OL5 (typescript) and I don't know how to fix this "GeometryFunction". Do you know how to build the GeometryFunction object? var myDraw = new Draw({ ...
1
vote
0answers
121 views

OpenLayers getText() from style function

I have a feature with a label set via feature.style.text. In my unit tests, I need to grab the value of the label. Normally I would use getStyle().getText().getText(). However, in the example below ...
1
vote
1answer
936 views

Using OpenLayers 5.3 in TypeScript without Node.js

I would like to use the latest version of OpenLayers (5.3) in small project. The requirements are: no Node.js - I will be running thing on the site hosted on IIS, simple HTML files scripts need to be ...
1
vote
0answers
468 views

Getting ArcGIS API for JavaScript to work in Typescript application using Webpack?

I am trying to incorporate the arcgis-js-api into an Angular2/Typescript application I am developing in Visual Studio 2017 using Webpack. I have not been successful in getting it work. I've gone ...
1
vote
0answers
124 views

WFS typescript/angular 4

Is there a WFS library that will work with typescript or angular 4 I would like the access a WFS server without showing a Map on the page so I dont think openlayers will work for me.
1
vote
0answers
341 views

OpenLayers with TypeScript events

I'm getting some problems using openlayers with TypeScript, there are some errors in the .on use, can you help me giving some tips? Argument of type '(event: Event) => void' is not assignable to ...
1
vote
0answers
298 views

Feature is undefined when click on map

I try to get feature from map that I add route and marker already but when I click at it. I get nothing from it. Do I miss something? I used typescript(angular 4) this is map declare: ngOnInit() { ...
1
vote
0answers
631 views

cannot append a featureCollection in typescript

I have the following interfaces: export interface Feature<T extends GeometryObject> extends GeoJsonObject { type: 'Feature' geometry: T; properties: any; id?: string; } export ...
1
vote
0answers
430 views

OpenLayers change:rotation not called

I am using ol-cesium and I want to receive an event when the map is rotated. So my approach is to use the change:rotation event of the ol.Map, but it is never called. this.map = new ol.Map({ ...
0
votes
1answer
24 views

Unable to insert geometry point using TypeScript and MassiveJS

I am trying to simply trying to validate a point before I actually insert it into the db. I am using the following: TypeScript: 3.5.2 MassiveJS: 6.4.0 PostgreSQL: 11 PostGIS: 2.5 const ...
0
votes
0answers
30 views

Adding local data to popupTemplate in ArcGIS JavaScript?

I would like to add drone.latitude, drone.longitude and track to fieldName, but I can't find a way to do it. This is what I have tried so far for the track parameter, but nothing shows up. This is ...
0
votes
0answers
1k views

How to render values onClick() event in componentDidMount()

I am using OpenLayer library and I need change values in ComponentDidMount() but when I am clicking it does not affect. I have used forceUpdate(). handleDisable = () => { this.setState({ ...