Hi Team.
While implementing graphic function inside the component, it's giving below error:
Error: Type '{ type: string; size: string; color: string; outline: { color: string; width: string; }; }' is not assignable to type 'SymbolProperties'.
Object literal may only specify known properties, and 'type' does not exist in type 'SymbolProperties'.
The application is running on the below-mentioned versions.
Angular version 11.2.7
typescript version 4.1.5
Could you please let me know if it's related to any version problem and If it is then is there any upgrade coming for this one shortly?
Thanks & Regards,
Sahil
I'm not sure about the sign-in issue, maybe check the permissions on your service.
I talked to a colleague. On the first issue of the Graphic not compiling, I missed the fact that you can't mix a Point with a LineSymbol, so getting a compiler error was valid. We recommending the following, and I verified this works on my machine:
import Point from '@arcgis/core/geometry/Point';
import SimpleMarkerSymbol from '@arcgis/core/symbols/SimpleMarkerSymbol';
const g = new Graphic ({
geometry : new Point({
// type : 'point' , // autocasts as new Point()
longitude : - 71.2643 ,
latitude : 42.0909
}),
symbol : new SimpleMarkerSymbol( {
// type : 'simple-line',
size : '12px' ,
color : 'blue' ,
outline : {
color : '#efefef' ,
width : '1.5px'
}
})});
On your second issue, with the graphic not showing up that may be related to an issue that's fixed in 4.19, which is coming out in a few weeks. Try upgrading to the "next" version: https://github.com/Esri/feedback-js-api-next. How you are using the JS API (e.g. esri-loader, arcgis-webpack-plugin, ES modules)? I can provide an example of how to do that.
It worked for me.
Moreover, I am using ES modules.
Thanks for your help!
Now I am trying to implement route and directions in my application but getting the following errors in the getRoute() functions.
Property 'routeResults' does not exist on type 'RouteResult'.
Type 'number[]' is missing the following properties from type 'Color': a, b, g, r, and 7 more.
Cannot assign to 'classList' because it is a read-only property.
This is the code snippet:
Can you please help me in the above issue.
@SahilBansal for your second question about Routes, I recommend creating a new issue with a new Title since it's not related to the original question and Title. That way the question will get more visibility.
Hi,
I have already created a new post for that new issue.