POST
|
Hi, I already tried this, but its not working. Currently I am using JBOSS application Server, Can you let me know where should I keep the files? I am using Eclipse (Windows Platform) for my application. Regards
... View more
05-02-2017
05:59 AM
|
0
|
1
|
223
|
POST
|
Hello, Are you asking how to host the API directly instead of using the esri CDN? --> Yes.
... View more
05-02-2017
05:44 AM
|
0
|
3
|
1190
|
POST
|
Hi, No. But if the user goes on Panning and zooming and then he wants to come back to original view then is there any functionality/button by which user can come back to initial view/point of map. Also I am messed up with the API, I have downloaded the ArcGis API for Javascript 4.3 version, but I dont know how to use it. To brief, as of now I am directly using the code in Javascript and using the functions including the module, but how do I configure the API with my Application directly? Can you please help?
... View more
05-01-2017
11:12 PM
|
0
|
5
|
1190
|
POST
|
Hello, Its done. Thank you Can you let me know if there is some method to automatically bring back to initial point on Map if user pans/zooms away from initial point? Regards
... View more
04-25-2017
10:14 PM
|
0
|
8
|
1190
|
POST
|
Robert, Thank you for correcting my silly mistake. You are a savior. I have one more query if you don't mind to answer. Can't we write the "require" and "function" block separately? Like below: require(["esri/Map","esri/views/MapView",...]); function(Map,Mapview,....) {.....} If I try to do above then it doesn't work. My aim is to pass the Lat/long value dynamically from another source. Something like this: var pt=new Point(x,y) { longitude=x; latitude=y; }; Is this possible? Warm Regards
... View more
04-24-2017
09:27 PM
|
0
|
10
|
1190
|
POST
|
Thanks Robert. I figured it out. I have one issue: I have raised this question: https://community.esri.com/thread/193728-none-of-the-widgets-are-working-in-my-application Can you answer this question? Regards
... View more
04-24-2017
06:50 AM
|
0
|
0
|
1555
|
POST
|
Hello, I am trying to add widgets (popup, search, basemaptoggle,etc) to my Map, but none of them are working. Any help from anybody appreciated. If I add any widget then the map does not show and I get a blank page. Below is the sample code: <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no"> <title>Get started with MapView - Create a 2D map</title> <style> html, body,#mapDiv { padding: 50px; height: 500px; width: 80%; position: absolute; } </style> <!-- <link rel="stylesheet" href="http://serverapi.arcgisonline.com/jsapi/arcgis/3.5/js/dojo/dijit/themes/claro/claro.css"/> --> <!-- <link rel="stylesheet" href="http://serverapi.arcgisonline.com/jsapi/arcgis/3.5/js/esri/css/esri.css"/> --> <link rel="stylesheet" href="https://js.arcgis.com/4.3/esri/css/main.css"> <script src="https://js.arcgis.com/4.3/"></script> <script> require([ "esri/Map", "esri/views/MapView", "esri/Graphic", "esri/geometry/Point", "esri/symbols/PictureMarkerSymbol", "esri/symbols/SimpleMarkerSymbol", "esri/symbols/SimpleLineSymbol", "esri/widgets/BasemapToggle" "dojo/domReady!" ], function( Map,MapView, Graphic, Point,PictureMarkerSymbol, SimpleMarkerSymbol, SimpleLineSymbol,BasemapToggle){ var map = new Map({ basemap: "topo", }); var view = new MapView({ container: "mapDiv", // Reference to the scene div created in step 5 map: map, // Reference to the map object created before the scene zoom:17, // Sets the zoom level based on level of detail (LOD) //center: [90, 22] // Sets the center point of view in lon/lat }); // 1 - Create the widget var toggle = new BasemapToggle({ // 2 - Set properties view: view, // view that provides access to the map's 'topo' basemap nextBasemap: "hybrid" // allows for toggling to the 'hybrid' basemap }); // Add widget to the top right corner of the view view.ui.add(toggle, "top-right"); }); var pt = new Point({ latitude:53.350140, longitude:-6.266155 }); //go to the given point view.center=pt; // Create a symbol for drawing the point <!-- var markerSymbol1 = new SimpleMarkerSymbol({ --> <!-- color: [226, 119, 40], --> <!-- outline: { // autocasts as new SimpleLineSymbol() --> <!-- color: [100, 100, 100], --> <!-- width: 1 --> <!-- } --> <!-- }); --> var markerSymbol = new PictureMarkerSymbol({ url: "http://static.arcgis.com/images/Symbols/Basic/RedStickpin.png", width: 30, height: 50 }); // Create a graphic and add the geometry and symbol to it var pointGraphic = new Graphic({ geometry: pt, symbol: markerSymbol }); // Add the graphics to the view's graphics layer view.graphics.addMany([pointGraphic]); }); </script> </head> <body> <div id="mapDiv"></div> </body> </html>
... View more
04-24-2017
12:49 AM
|
0
|
12
|
2247
|
POST
|
Hello Robert, I want a "stick pin or push Pin" to point on map on the specific location. As of now I am able to show a filled circle using Simple marker Symbol. Can you please let me know how to add Push Pin/Stick pin? Regards
... View more
04-23-2017
10:32 PM
|
0
|
2
|
1555
|
POST
|
Hi, view.goTo(pt); --> Doesn't Work as it takes the map to different continent and also does not show my Point graphic view.center=pt; --> But thanks to your Article as this works Perfectly Now I need to just find a way to dynamically pass the lat/long values to the JS Point. Regards
... View more
04-21-2017
07:21 AM
|
0
|
0
|
1555
|
POST
|
Hi, Actually not. Below is the Snippet: var view = new MapView({ container: "mapDiv", //Reference to the div id created in html map: map, // Reference to the map object created above zoom: 5, // Sets the zoom level based on level of detail (LOD) center: [82, 22] // Sets the center point of view in lon/lat -------> I have to Manually Set this with trial/error method to check get it aligned to lat/long. }); // First create a point geometry (this is the location of the Titanic) var point = new Point({ longitude:72, // for Mumbai (India) latitude:19 //for Mumbai (India) }); I have to Manually Set this with trial/error method to check get it aligned to lat/long to see my Point. My Goal : I want to pass lat/long dynamically (coming from another application) and it should show me the desired location in the specified area. As of now I am entering lat/long manually, but stuck in the concept of "Center". Can you tell me how should I deal with it? Your reply and help is appreciated
... View more
04-21-2017
06:36 AM
|
0
|
5
|
1555
|
POST
|
Hello Robert, Thank you for your prompt reply and help. Actually I have included the mapDiv in another HTML (thymeleaf) which calls the CSS and JS. Below is the Snippet: <div class="row"> <div id="mapDiv"/> </div> FYI, the issue is now solved. Yeah. the height is small because I am embedding a map in an application and I need to show only the portion for which lat/long will be provided. I have another problem now, i.e. with "center". When I give lat/long in Point Function the map is not shown on that point but I have to manually pan it to the Point. How to coordinate with lat/long and center? Your help is appreciated. Thanks for your reply in advance.
... View more
04-21-2017
06:19 AM
|
0
|
7
|
1555
|
POST
|
Hello, I have integrated map with my application. But when the page (thymeleaf html) loads the map keeps loading and the page grows which goes blank. I want the map to be in that square box and not to grow. can somebody help? its urgent...I think there is issue with CSS? Javascript: require([ "esri/Map", "esri/views/MapView", "esri/Graphic", "esri/geometry/Point", "esri/symbols/SimpleMarkerSymbol", "esri/symbols/SimpleLineSymbol", "dojo/domReady!" ],function( Map,MapView, Graphic, Point, SimpleMarkerSymbol, SimpleLineSymbol){ var map = new Map({ basemap: "hybrid" }); var view = new MapView({ container: "mapDiv", // Reference to the scene div created in step 5 map: map, // Reference to the map object created before the scene zoom: 5, // Sets the zoom level based on level of detail (LOD) center: [20, 60] // Sets the center point of view in lon/lat }); // First create a point geometry (this is the location of the Titanic) var point = new Point({ longitude:18.5204, latitude: 73.8567 }); // Create a symbol for drawing the point var markerSymbol = new SimpleMarkerSymbol({ color: [226, 119, 40], outline: { // autocasts as new SimpleLineSymbol() color: [255, 255, 255], width: 2 } }); // Create a graphic and add the geometry and symbol to it var pointGraphic = new Graphic({ geometry: point, symbol: markerSymbol }); // Add the graphics to the view's graphics layer view.graphics.addMany([pointGraphic]); }); CSS: #mapDiv { padding-top: 0px; padding-bottom: 10px; margin: 50px; height: 50px; width: 50%; }
... View more
04-21-2017
12:20 AM
|
0
|
9
|
2508
|
POST
|
I am trying to install this API on Jboss Application Server but getting a "Page not Found" error. I have updated the init.js and dojo.js.
... View more
04-17-2017
06:21 AM
|
0
|
0
|
370
|
POST
|
Hello, I want to add map to my existing java application and I want to pass latitude/longitude dynamically so that it should Pin point to that specific location. Its a Maven Spring application. I am using Jboss as application Server. How should I get started? Can anyone outline the steps for me? Thanks
... View more
04-16-2017
11:21 PM
|
0
|
0
|
958
|
POST
|
Hello, I want to add map to my existing java application and I want to pass latitude/longitude dynamically so that it should Pin point to that specific location. Its a Maven Spring application. I am using Jboss as application Server. How should I get started? Can anyone outline the steps for me? Thanks
... View more
04-16-2017
10:58 PM
|
0
|
0
|
549
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|