Giter VIP home page Giter VIP logo

Comments (7)

jwasilgeo avatar jwasilgeo commented on July 30, 2024

Looks like you're using Esri JSAPI version 3.x with Angular version 1.x, correct?

You can definitely accomplish this--no problem--and we have provided documented patterns and workflows that are highly recommended to look at if you haven't had a chance to absorb them yet:

https://arcgis.github.io/angular-esri-map-site-v1/#/patterns (also look at the sub-topic patterns pages there)

Then I'd recommend reviewing this sample for inspiration: https://arcgis.github.io/angular-esri-map-site-v1/#/examples/other-esri-modules

from angular-esri-map.

androidparth avatar androidparth commented on July 30, 2024

Hi.

Thanks for your quick reply.
I am using Esri version 3.x with Angular version 4.x

I am unable to find any information on use Esri with Angular 2/4 especially when it comes to display direction routes between two points.

What I need is basically an Angular version of https://developers.arcgis.com/javascript/3/jssamples/widget_directions_basic.html

from angular-esri-map.

jwasilgeo avatar jwasilgeo commented on July 30, 2024

In that case what you’re looking for is discussed here:

Ultimately “esri-loader” is what you’ll want to use to get Esri JSAPI inside of an Angular 2+ app.

When it comes specifically to routing, drawing points, and other GIS functionality, it’ll be best to rely on the official Esri docs and samples.

from angular-esri-map.

androidparth90 avatar androidparth90 commented on July 30, 2024

Hi,

Ok. I will try using the "esri-loader". The Esri docs have samples (link I shared above) but those are for pure JavaScript. Do you think those can easily be ported to Angular 2+ ?

Is there any major or drastic difference at the API levels or is the same with just a difference of names of API?
Please provide your views on the same

from angular-esri-map.

andygup avatar andygup commented on July 30, 2024

Here's an example of using esri-loader with Angular 2+ https://github.com/andygup/angular-cli-esri. This sample is in the process of being moved over to github.com/esri.

from angular-esri-map.

androidparth90 avatar androidparth90 commented on July 30, 2024

Hi Andy,

Thanks to your awesome example, I was able to load an Esri map using Angular 4.

Here is what I exactly need:

I have created an HTML page already that displays an Esri map with pre-loaded points and draws the route between pre-defined points. I have attached the same for your reference.

If you can help me convert this Esri JS API 3.x code into an Angular 2+ equivalent then that would be very helpful. I need to use the same version 3.x for project support purposes and can't move to 4.x. However, if the same is possible in 4.x then its not a problem migrating.

Thanks once again!

test.zip

from angular-esri-map.

andygup avatar andygup commented on July 30, 2024

@androidparth90 Glad the sample helped! I just took a quick glance at your code, everything you need for that app is in the 4.x API.

Directions Widget: https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Directions.html

SimpleRenderer: https://developers.arcgis.com/javascript/latest/api-reference/esri-renderers-SimpleRenderer.html

SimpleMarkerSymbol: https://developers.arcgis.com/javascript/latest/api-reference/esri-symbols-SimpleMarkerSymbol.html

Also, be sure to read these two handy pages on migrating from 3.x to 4.x https://developers.arcgis.com/javascript/latest/guide/migrating/index.html and https://developers.arcgis.com/javascript/latest/guide/functionality-matrix/index.html

from angular-esri-map.

Related Issues (20)

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.