|
POST
|
I have an app that is starting to get a rather large amount of JS. I was wondering if I could start to separate certain bits of code in a separate JS file and then just reference them. If I reference it in HTML as I do the main JS file I get errors saying the map is not defined. <script src="js/index.js"></script> <script src="js/elevationprofile.js"></script> Is there a way to reference all the split out JS files in the main JS file?
... View more
01-31-2018
06:43 AM
|
0
|
12
|
6071
|
|
POST
|
Think I figured it out...opened in notepad and added the 0.0 I saw in yours... THANKS A MILLION OLD <?xml version="1.0" encoding="UTF-8"?> <kml xmlns="http://earth.google.com/kml/2.2"> <Document><Style id="style-1"><LineStyle><color>ffff00ff</color><width>1</width></LineStyle><IconStyle><color>ffff00ff</color><scale>1</scale><Icon><href>http://maps.google.com/mapfiles/kml/pal4/icon57.png</href></Icon></IconStyle></Style> <Placemark> <styleUrl>#style-1</styleUrl> <LineString><tessellate>1</tessellate> <coordinates> -67.284317,45.1135101, -67.2847519,45.1134605, -67.2846451,45.1135864, -67.2845459,45.1133575, </coordinates> </LineString> </Placemark> </Document> </kml> NEW - FIXED <?xml version="1.0" encoding="UTF-8"?> <kml xmlns="http://earth.google.com/kml/2.2"> <Document><Style id="style-1"><LineStyle><color>ffff00ff</color><width>1</width></LineStyle><IconStyle><color>ffff00ff</color><scale>1</scale><Icon><href>http://maps.google.com/mapfiles/kml/pal4/icon57.png</href></Icon></IconStyle></Style> <Placemark> <styleUrl>#style-1</styleUrl> <LineString><tessellate>1</tessellate> <coordinates> -67.284317,45.1135101, 0.0 -67.2847519,45.1134605, 0.0 -67.2846451,45.1135864, 0.0 -67.2845459,45.1133575, 0.0 </coordinates> </LineString> </Placemark> </Document> </kml>
... View more
01-05-2018
01:08 PM
|
1
|
1
|
3553
|
|
POST
|
HOW did you correct it...I have a bunch to correct if this is the case UPDATE....Here is a point file...not sure what has to be done... Can you tell me how you fixed the Line kml and how to fix the point kml?
... View more
01-05-2018
11:48 AM
|
0
|
2
|
3553
|
|
POST
|
I got the answer to my 2nd question....I used the parameter showClearButton Still looking for the first question regarding adding XY from map click
... View more
01-05-2018
11:11 AM
|
0
|
2
|
2056
|
|
POST
|
I am using this: Directions | ArcGIS API for JavaScript 3.23 2 QUESTIONS: Is there a way to do a map click and record the XY in the To and From fields instead of entering an address or using the GPS locator? Can I add parameters to the widget for XY To and From? I can add a button to capture the XY into a variable but dont know if I can push that variable value to the To and From before running the widget How do I clear the directions after the widget is run. Looking for a clear all
... View more
01-05-2018
10:54 AM
|
0
|
5
|
2163
|
|
POST
|
I am trying to process and display a KMZ file in arcgis. I extracted the KMZ to KML with an online converter. I tested these new KML files in Google Earth Pro and they display fine! I the tried to bring one into ArcGIS Explorer and they are all messed up... I try and convert KML to Layer and they are still all messed up. Attached are the images of what I am seeing and a copy of one of the KML files. Anyone know whats going on...it displays in Google Earth fien but not ESRI products
... View more
01-05-2018
10:00 AM
|
0
|
4
|
8146
|
|
POST
|
I was able to do it this way....any other suggestions to improve welcome I open the div when the user completes the drawing of the polyline with: dijit.byId("profilecontainer").domNode.style.visibility = 'visible'; <div id="elevationdiv" data-dojo-type="dijit/TitlePane" data-dojo-props="title:'Elevation', closable:false, open:false">
<div id="info2" >
<label>Digitize a route:</label>
<button id="Polyline" type="button">Polyline</button>
<button id="FreehandPolyline" type="button">Freehand Polyline</button>
<label>Select unit measure:</label>
<select id="unitsSelect">
<option value="esriMiles">Miles</option>
<option value="esriKilometers">Kilometers</option>
<option value="esriMeters">Meters</option>
<option value="esriNauticalMiles">Nautical Miles</option>
<option value="esriYards">Yards</option>
<option value="esriFeet">Feet</option>
</select>
</div>
</div>
<div id="map" data-dojo-type="dijit/layout/BorderContainer" data-dojo-props="region:'center'" style="height:100%">
<div id="profilecontainer" data-dojo-type="dijit.layout.ContentPane" data-dojo-props="region:'bottom'" >
<div id="profileChartNode"></div>
</div>
</div> on(dom.byId("elevationdiv"), "click", function() {
if (dijit.byId("elevationdiv").open) {
//alert("open");
}
if (!dijit.byId("elevationdiv").open) {
//alert("closed");
dijit.byId("profilecontainer").domNode.style.visibility = 'hidden';
map.graphics.clear();
epWidget.clearProfile(); //Clear profile
}
});
... View more
01-04-2018
10:07 AM
|
1
|
0
|
1917
|
|
POST
|
I think I have it working....just testing....so dont waste your time on this...after I post my results I might have a question or two....
... View more
01-04-2018
08:53 AM
|
0
|
1
|
1917
|
|
POST
|
I am looking at this example: ArcGIS API for JavaScript Sandbox How could you modify this so the chart div is hidden on load...sure you can just set that property in HTML style. or on map load dijit.byId("profilecontainer").domNode.style.visibility = 'hidden'; BUT when the user hits the polyline button it then opens the chart to say 40% BUT i also need to close the chart window...maybe a button below the miles selector. It would need to close the chart window and then expand the map to the full area. So I guess I am asking how to control two containers. When one opens it sizes to 40% height and 100% width When it closes the map window resizes to 100%
... View more
01-04-2018
08:35 AM
|
0
|
2
|
2029
|
|
POST
|
I think I got it...switched to JSON...this look correct? Not getting any errors so excited. var marker = new SimpleMarkerSymbol({
"xoffset": 0,
"angle": 0,
"yoffset": 0,
"outline": {
"color": [0,0,0,255],
"width": .5,
"type": "esriSLS",
"style": "esriSLSSolid"
}
});
marker.setPath("M14.5,29 23.5,0 14.5,9 5.5,0z");
... View more
12-28-2017
08:09 AM
|
0
|
4
|
2619
|
|
POST
|
With set color removed HOW can I set the outline color of the arrow? Is there a way to set the outline color in the renderer? var renderer = new SimpleRenderer(marker);
renderer.setRotationInfo({
field: "HEAD",
rotationType: "arithmetic"
});
renderer.setColorInfo({
field: "SPEED",
minDataValue: 0,
maxDataValue: 150,
colors: [
new Color([255,0,0]), new Color([255,0,0]), new Color([34,139,34]), new Color([34,139,34]), new Color([34,139,34]), new Color([34,139,34]), new Color([34,139,34]), new Color([34,139,34])
]
});
... View more
12-28-2017
07:56 AM
|
0
|
6
|
2619
|
|
POST
|
I dug deeper like I should have in the first place .... but I was fixated on the .setPath("M14.5,29 23.5,0 14.5,9 5.5,0z") I started removing each one and came up with the .setColor (which I didn't even need in the first place as I am setting that int the renderer) var marker = new SimpleMarkerSymbol().setPath("M14.5,29 23.5,0 14.5,9 5.5,0z")
.setSize(20)
.setOutline(new SimpleLineSymbol()
.setColor("#ffffff")
.setWidth(2));
I removed the .setColor and added everything back in and it works now... var marker = new SimpleMarkerSymbol().setPath("M14.5,29 23.5,0 14.5,9 5.5,0z")
.setAngle(180)
.setSize(20)
.setOutline(new SimpleLineSymbol()
.setWidth(0.5)); Sorry for wasting your time...
... View more
12-28-2017
07:53 AM
|
0
|
7
|
2619
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 09-20-2018 11:09 AM | |
| 1 | 09-10-2018 06:26 AM | |
| 1 | 09-15-2022 11:02 AM | |
| 1 | 05-21-2021 07:35 AM | |
| 1 | 08-09-2022 12:39 PM |
| Online Status |
Offline
|
| Date Last Visited |
09-19-2022
09:23 PM
|