|
POST
|
No. I'm just running ArcPy on the Server machine. The trouble started when I installed Desktop on the ArcGIS Server machine. So we had the 32 and 64 bit versions of Python installed. I uninstalled Desktop and got rid of the previous Python folders (10.5 32bit, 10.3 64 bit) and the problem persists. I've confirmed that Bitstream Vera Sans is installed in the the matplotlib and reportlab site-packages folder, and in the Windows fonts folder. I've tried registering it and deleting the font list cache, and nothing works. I've looked at the fontList JSON file in the .matplotib folder, and Bitstream Vera Sans is listed in the Windows folder along with all the other fonts.
... View more
06-07-2018
09:27 AM
|
0
|
1
|
9286
|
|
POST
|
I looked on another computer with identical scripts that is creating the charts correctly and Vera is installed in the matplotlib mpl-data fonts ttf folder. I have it installed in the same place on the server machine, but I cannot get the script to find it. It's still defaulting to DejaVu Sans.
... View more
06-07-2018
09:02 AM
|
0
|
3
|
9286
|
|
POST
|
Well, thank you. Our Server 10.5 and Web Adapter are configured and working well.
... View more
06-07-2018
08:57 AM
|
1
|
0
|
1017
|
|
POST
|
I am going bonkers trying to figure this out. I've deleted the fontList cache, I've installed Bitstream Vera Sans in the matplotlib ttf fonts folder, I've tried to register it. It's still defaulting to Deja Vu and screwing up my charts
... View more
06-06-2018
03:08 PM
|
0
|
5
|
9286
|
|
POST
|
OK. Instead of map.on("click"), $$(document).on(“click”) seems to work on iOS and Android, but it as not as responsive as map.on("click"). Also, sometimes the ESRI basemaps don't load when I navigate to the pages. I have to go back and try again. It's working in iOS, but I get this error in the dev console in Safari TypeError: undefined is not an object (evaluating 'b.type') in relation to this function: $$(document).on("click", function(evt){
var mp = webMercatorUtils.webMercatorToGeographic(evt.mapPoint);
x = mp.x.toFixed(3);
y = mp.y.toFixed(3);
map.graphics.clear();
var graphic = new Graphic(evt.mapPoint);
map.graphics.add(graphic);
map.infoWindow.setFeatures([graphic]);
map.infoWindow.resize(200,200);
map.infoWindow.setContent(" Longitude: " + x.toString() + " <br>Latitude: " + y.toString());
map.infoWindow.show(evt.mapPoint)
map.infoWindow.setTitle("Forecast Reports");
}); I think it's having trouble with evt,mapPoint, but it's still generating a popup.
... View more
06-06-2018
08:29 AM
|
0
|
0
|
846
|
|
POST
|
I did not. The ArcGIS JS 3.24 portions of this app were ported over from our website. Should I add a Cordova script? The iOS version of this is working like as it should and is ready to be distributed, so I can't make any major changes now.
... View more
06-05-2018
01:42 PM
|
0
|
0
|
846
|
|
POST
|
OK. Here is the JS for the app. Map_B is an html page that is loaded from a link button. // Initialize app
var myApp = new Framework7();
// If we need to use custom DOM library, let's save it to $$ variable:
var $$ = Dom7;
// Add view
var mainView = myApp.addView('.view-main', {
domCache: true
});
// Handle Cordova Device Ready Event
$$(document).on('deviceready', function() {
console.log("Device is ready!");
});
myApp.onPageInit('map_B', function (page){
var map;
require([
"esri/config",
"esri/map",
"esri/arcgis/utils",
"esri/tasks/Geoprocessor",
"esri/tasks/GeometryService",
"esri/graphic",
"esri/geometry/webMercatorUtils",
"esri/dijit/Popup",
"esri/InfoTemplate",
"esri/dijit/HomeButton",
"esri/dijit/Search",
"dojo/dom-construct",
"dojo/dom",
"dojo/i18n!esri/nls/jsapi",
"dojo/dom-attr",
"dojo/query",
"dojo/on",
"dojo/parser",
"dijit/layout/BorderContainer",
"dijit/layout/ContentPane",
"dijit/TitlePane",
"dojo/domReady!"
], function (
esriConfig, Map, arcgisUtils, Geoprocessor, GeometryService,
Graphic, webMercatorUtils, Popup, InfoTemplate, HomeButton, Search,
domConstruct, dom, esriBundle, domAttr, query, on, parser
) {
esriBundle.widgets.Search.main.placeholder = "Find address, place or lat/lon";
map = new Map("map", {
basemap: "hybrid",
center: [-97, 40],
zoom: 3,
slider: false
});
esriConfig.defaults.geometryService = new GeometryService("http://gis.mymetcon.com/arcgis/rest/services/Utilities/Geometry/GeometryServer");
var home = new HomeButton({
map: map
}, "HomeButton_B");
home.startup();
var search = new Search({
map: map,
showInfoWindowOnSelect: false,
enableLabel: false,
enableHighlight: false,
enableSuggestions: true
}, "search_B");
search.startup();
var x,y;
//Initial click function
map.on('click, touchend', function(evt){
var mp = webMercatorUtils.webMercatorToGeographic(evt.mapPoint);
x = mp.x.toFixed(3);
y = mp.y.toFixed(3);
map.graphics.clear();
var graphic = new Graphic(evt.mapPoint);
map.graphics.add(graphic);
map.infoWindow.setFeatures([graphic]);
map.infoWindow.resize(200,200);
map.infoWindow.setContent(" Longitude: " + x.toString() + " <br>Latitude: " + y.toString());
map.infoWindow.show(evt.mapPoint)
map.infoWindow.setTitle("Forecast Reports");
});
var locationStr;
window.gp_chart = new Geoprocessor("http://gis.mymetcon.com/arcgis/rest/services/Three_Week_Chart/GPServer/ThreeWeekChart");
//Three week chart link click
var link = domConstruct.create("a",{
"class": "action",
"id": "chartLink_B",
"innerHTML": "Generate Chart", //text that appears in the popup for the link
"href": "javascript: void(0);"
}, query(".actionList", map.infoWindow.domNode)[0]);
on(link, "click", function()
{
window.navigator.notification.prompt(
"Enter Location Name: ", // message
handleLocationPrompt, // callback
"", //title
["Ok", "Exit"] // button titles
);
// handle user's dialog action
function handleLocationPrompt(results) {
if (results.buttonIndex === 1) {
// Ok
locationStr = results.input1;
var lat,lon = "";
lat = x.toString();
lon = y.toString();
var taskParams = {
"Latitude": lat,
"Longitude": lon,
"Location": locationStr
};
domAttr.set(dom.byId("chartLink_B"), "innerHTML", "Generating Chart...");
window.gp_chart.execute(taskParams, gpChartResultAvailable);
}
}
});
var content = "";
var chartPath;
function gpChartResultAvailable(results, messages){
domAttr.set(dom.byId("chartLink_B"),"innerHTML", "Three Week Chart");
//clear any existing features displayed in the popup
map.infoWindow.startup();
if(results == 0){
var chartPath = "http://gis.mymetcon.com/Test_Charts/Three_Week_Chart_for_" + locationStr + ".png";
//content = '<IMG SRC="' + chartPath + '" width=100% height=100%>';
}else{
content = " Unable To Generate Chart";
}
map.infoWindow.resize(250, 170);
map.infoWindow.setTitle("Click on Chart");
var img = document.createElement("img");
img.src=chartPath;
img.width=240;
img.height=160;
img.addEventListener("click", function () {window.location = chartPath;});
map.infoWindow.setContent(img);
map.infoWindow.reposition();
};
});
})
... View more
06-05-2018
11:01 AM
|
0
|
4
|
2227
|
|
POST
|
OK. My coworker tested it on an Android phone and can't get it to work either. The touch event is supposed to trigger a popup.
... View more
06-05-2018
10:16 AM
|
0
|
6
|
2227
|
|
POST
|
Not when I run the apk in Appetize.io. Maybe it will work on an actual Android device though? Since I'm using a mouse click through the browser.
... View more
06-05-2018
10:08 AM
|
0
|
8
|
2227
|
|
POST
|
Robert, This method works in iOS but not in the Android emulator (appetize.io). I don't have an Android device, so that's what I've been using to test the apk. Here is a link to the debug build: https://build.phonegap.com/apps/3040375/download/android
... View more
06-05-2018
09:44 AM
|
0
|
10
|
2227
|
|
POST
|
I think this might be a Python path problem somewhere. This script is run locally and it calls on a local Python module to make charts. The same module is called through GP tools on our ArcGIS Server, and those charts look fine.
... View more
06-05-2018
09:16 AM
|
0
|
0
|
9286
|
|
POST
|
I have a PhoneGap hybrid app developed with ArcGIS JS API 3.24 and Framework7 v1. I have a map click event that’s working in IOS, but not Android. Is there an event handler method that works for both? map.on('click', function(evt){
code here...
});
... View more
06-05-2018
08:49 AM
|
0
|
16
|
3501
|
|
POST
|
I'm having this issue again after upgrading to Server 10.5.1 and Python 2.7.13
... View more
06-04-2018
10:42 AM
|
0
|
8
|
9286
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 04-08-2019 09:21 AM | |
| 1 | 04-05-2019 04:21 PM | |
| 2 | 04-01-2019 10:11 AM | |
| 1 | 03-22-2019 09:30 AM | |
| 1 | 05-16-2019 08:42 AM |
| Online Status |
Offline
|
| Date Last Visited |
11-11-2020
02:24 AM
|