|
POST
|
Dear @UndralBatsukh Thank you for replay. It works, but only for Font Size, Font Color etc. But not for Font Style. Font Style remains default Sans-Serif... Code Template: welltemplate = {
title: "Well",
content: "<div style='font-family:HKolkhetyMtav;font-size:26px;color:red'><li> Hello Guys</li></div>"
}; I use local font for my native language ( It is Georgian), here is CSS for it: @font-face { font-family: 'HKolkhetyMtav'; src: url('./fonts/hkolkhetymtav.ttf') format('embedded-opentype'), /* Internet Explorer */ url('./fonts/hkolkhetymtav.ttf') format('woff2'), /* Super Modern Browsers */ url('./fonts/hkolkhetymtav.ttf') format('woff'), /* Pretty Modern Browsers */ url('./fonts/hkolkhetymtav.ttf') format('truetype'), /* Safari, Android, iOS */ url('./fonts/hkolkhetymtav.ttf') format('svg'); /* Legacy iOS */ }; If i change font style in browser for <li> it works fine ( I have changed default FONT into Georgian FONT ("Hello Guys" is translated as "ცელოო ჩუყს"), see pics please:
... View more
04-15-2021
12:14 PM
|
0
|
0
|
3117
|
|
POST
|
Dear Noah, Thank you for response, for 4.12 (or 4.14 I do not remember exactly) I used CSS code like this to change font style in Popup: .esri-widget__table { font-family: HKolkhetyMtav; /* ფონტის შეცვლა popup-ში */ }; and it worked. Now as you told me I tried something like this: welltemplate = { title: "Well", content: '<i style="font-family:Garamond;font-size:16px"> xxxxx</i>' }; but no success. What to do I do not know 😞
... View more
04-12-2021
01:30 PM
|
0
|
0
|
3146
|
|
POST
|
Hi Guys, I am using API 4.18, I need to change Font in Popup, I need to use my local font. I could do it for API 4.13 using CSS, but now it stops working. How can I do this now? Kind regards, Vakhtang
... View more
04-12-2021
06:08 AM
|
0
|
5
|
3228
|
|
POST
|
Hi all, I have one issue on my JavaScript API map, I want ta add feature layers from server, some of them I can add without problem, but some of them I can't. Those I can't add as feature layer, but as MapImageLayer I can add without any issue. All this layer are in same .MXD file I have shared on server, they have same Spatial Reference 32638 (32638). Any idea what is might be problem? I need this layers as FeatureLayers on my map. Thank you.
... View more
02-19-2021
02:07 AM
|
0
|
0
|
878
|
|
POST
|
Dear Arne, I have used these, but it cahanges popup info for all the popups on map, i need to change only one popup not all. See pic. i want to change font for first fieldNam: "Number_Ent", but only for this layer's popup not forr other layers.
... View more
10-22-2020
10:44 AM
|
0
|
0
|
3329
|
|
POST
|
Hi all, Hope find you all well, In database i have Unicode characters in Georgian, now in some fields of popup i want to have English characters, i change fonts using CSS, but it is for global use, for every layers Popup. E.g in second field of popup for Canals i have name like : "არხი" (in Georgian) and for Holes i have dimensions like L5/H10( length and Hight), but when i change font using CSS for name it works, but for dimensions it shows like L and H in Georgian letters. Any idea and easy way how to it? Thanks, Stay all well
... View more
10-21-2020
06:22 PM
|
0
|
8
|
3411
|
|
POST
|
Hi guys, Robert Scheitlin, GISP, Ken Buja, Sorry, last question about that i marked as assumed answered and had to create new one. I have autocomplete search widget generated from JQUERY. Autocomplete works for some features ( it is street names ), but some features didn't appears in autocomplete, while if i write in text field name of a street manually ( it should be full name, including , . ! etc) it finds the street. When i check it on server side it does the same, if GEOMETRY is TRUE some features is missing, if FALSE again some features is still missing, no full features is response. Here is a code i use: /Autocomplete
$(function () {
var array = []
queryTask = new QueryTask(myURL);
query = new Query();
query.returnGeometry = false;
query.outFields = ["street_names"];
query.where = "1=1";
queryTask.execute(query).then(showResults);
function showResults(results) {
// Collect the results
var resultItems = [];
var resultCount = results.features.length;
for (var i = 0; i < resultCount; i++) {
var featureAttributes = results.features[i].attributes;
for (var attr in featureAttributes) {
// Convert the attribute to a string. Null Values create an extra comma which stops the widget from functioning.
tags = String(featureAttributes[attr]);
// push the attributes tothe blank array
resultItems.push(tags);
}
}
// Sort the array
sorted = resultItems.sort()
// Remove Duplicates
var uniqueNames = [];
$.each(sorted, function (i, el) {
if ($.inArray(el, uniqueNames) === -1) uniqueNames.push(el);
});
// Set the varrible array
array = uniqueNames
// This is your AutoComplete Widget
var availableTags = array;
// Reference the div id which you want the autocomplete list to appear (in this case tag)(appear only 30 records)
$("#searchInput").autocomplete({
source: function (request, response) {
var results = $.ui.autocomplete.filter(availableTags, request.term);
response(results.slice(0, 20)); // მიუთითე რამდენი ჩანაწერი გინდა რომ გამოჩნდეს autocomplete- ში ერთდროულად.
}
});
}
});
... View more
09-23-2020
02:53 PM
|
0
|
1
|
2222
|
|
POST
|
Hi guys, I have autocomplete search widget generated from JQUERY. Autocomplete works for some features ( it is street names ), but some features didn't appears in autocomplete, while if i write in text field name of a street manually ( it should be full name, including , . ! etc) it finds the street. When i check it on server side it does the same, if GEOMETRY is TRUE some features is missing, if FALSE again some features is still missing, no full features is responsed. Here is a code i use: //Autocomplete
$(function () {
var array = []
queryTask = new QueryTask(myURL);
query = new Query();
query.returnGeometry = false;
query.outFields = ["street_names"];
query.where = "1=1";
queryTask.execute(query).then(showResults);
function showResults(results) {
// Collect the results
var resultItems = [];
var resultCount = results.features.length;
for (var i = 0; i < resultCount; i++) {
var featureAttributes = results.features[i].attributes;
for (var attr in featureAttributes) {
// Convert the attribute to a string. Null Values create an extra comma which stops the widget from functioning.
tags = String(featureAttributes[attr]);
// push the attributes tothe blank array
resultItems.push(tags);
}
}
// Sort the array
sorted = resultItems.sort()
// Remove Duplicates
var uniqueNames = [];
$.each(sorted, function (i, el) {
if ($.inArray(el, uniqueNames) === -1) uniqueNames.push(el);
});
// Set the varrible array
array = uniqueNames
// This is your AutoComplete Widget
var availableTags = array;
// Reference the div id which you want the autocomplete list to appear (in this case tag)(appear only 30 records)
$("#searchInput").autocomplete({
source: function (request, response) {
var results = $.ui.autocomplete.filter(availableTags, request.term);
response(results.slice(0, 20)); // მიუთითე რამდენი ჩანაწერი გინდა რომ გამოჩნდეს autocomplete- ში ერთდროულად.
}
});
}
});
... View more
09-23-2020
12:39 AM
|
0
|
0
|
1021
|
|
POST
|
Hi Guys, i have some JSON data and wantto display it on map, but i cant. what i do wrong? var flayer = new FeatureLayer ({
objectIdFieldName: "OBJECTID",
globalIdFieldName: "",
geometryType: "point",
fields: [
{
name: "OBJECTID",
alias: "OBJECTID",
type: "oid"
},
{
name: "Wis_kam_ID",
alias: "Wis_kameris_ID",
type: "string",
length: 12
},
{
name: "nomeri_planSetze",
alias: "nomeri_planSetze",
type: "string",
length: 50
}],
features: [{
geometry: {
x: 477262.23610000033,
y: 4637311.2296999991
}
}],
attributes: {
OBJECTID: 1,
Wis_kam_ID: "WA-AR-1",
nomeri_planSetze: null,
}
})
map.add(flayer)
... View more
09-04-2020
06:33 AM
|
0
|
1
|
1793
|
|
POST
|
Thanks Robert, i guessed what was my problem. Great!
... View more
08-24-2020
03:15 AM
|
0
|
0
|
3437
|
|
POST
|
Hi Robert, I tried different ways and now i can get my layer, but still some problem. When i click ones it returns layer, but in my form it does not appear and when i click second time it appears in form, but when i change text it returns error : ---- Uncaught TypeError: Cannot convert undefined or null to object Here is a screen shot and code (Code is a standard Applyedits, just to show you where featutreLayer goes) for review: view.on("click", function(event) {
view.hitTest(event)
.then(getGraphics);
})
function getGraphics(response) {
var graphic = response.results[0].graphic;
var attributes = graphic.attributes;
var ido = graphic.layer;
console.log(ido)
const featureForm = new FeatureForm({
container: "formDiv",
layer: ido,
fieldConfig: [
{
name: "komentari",
label:"komentari",
}
]
});
document.getElementById(formDiv)
featureForm.on("submit", function() {
if (editFeature) {
const updated = featureForm.getValues();
Object.keys(updated).forEach(function(name) {
editFeature.attributes.komentari =
document.getElementById("Req_Code").value;
});
const edits = {
updateFeatures: [editFeature]
};
applyEditsToIncidents(edits);
document.getElementById("viewDiv").style.cursor = "auto";
}
});
selectExistingFeature();
function applyEditsToIncidents(params) {
unselectFeature();
ido
.applyEdits(params)
.then(function(editsResult) {
if (
editsResult.addFeatureResults.length > 0 ||
editsResult.updateFeatureResults.length > 0
) {
unselectFeature();
let objectId;
if (editsResult.addFeatureResults.length > 0) {
objectId = editsResult.addFeatureResults[0].objectId;
} else {
featureForm.feature = null;
objectId = editsResult.updateFeatureResults[0].objectId;
}
selectFeature(objectId);
if (addFeatureDiv.style.display === "block") {
toggleEditingDivs("none", "block");
}
}
else if (editsResult.deleteFeatureResults.length > 0) {
toggleEditingDivs("block", "none");
}
})
.catch(function(error) {
console.log("===============================================");
console.error(
"[ applyEdits ] FAILURE: ",
error.code,
error.name,
error.message
);
console.log("error = ", error);
});
}
function selectExistingFeature() {
view.on("click", function(event) {
// clear previous feature selection
unselectFeature();
if (
document.getElementById("viewDiv").style.cursor != "crosshair"
) {
view.hitTest(event).then(function(response) {
// If a user clicks on an incident feature, select the feature.
if (response.results.length === 0) {
toggleEditingDivs("block", "none");
} else if (
response.results[0].graphic &&
response.results[0].graphic.layer == ido
) {
if (addFeatureDiv.style.display === "block") {
toggleEditingDivs("none", "block");
}
selectFeature(
response.results[0].graphic.attributes[
ido.objectIdField
]
);
}
});
}
});
}
function selectFeature(objectId) {
// query feature from the server
ido
.queryFeatures({
objectIds: [objectId],
outFields: ["*"],
returnGeometry: true
})
.then(function(results) {
if (results.features.length > 0) {
editFeature = results.features[0];
// display the attributes of selected feature in the form
featureForm.feature = editFeature;
console.log(editFeature.attributes.komentari)
document.getElementById("Req_Code").value = editFeature.attributes.komentari;
view.whenLayerView(editFeature.layer).then(function(layerView) {
highlight = layerView.highlight(editFeature);
});
}
});
}
const addFeatureDiv = document.getElementById("addFeatureDiv");
const attributeEditing = document.getElementById("featureUpdateDiv");
function unselectFeature() {
if (highlight) {
highlight.remove();
}
}
document.getElementById("btnUpdate").onclick = function() {
// Fires feature form's submit event.
featureForm.submit();
//removeLR()
};
};
... View more
08-21-2020
06:43 AM
|
0
|
2
|
3437
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 08-22-2022 11:57 PM | |
| 1 | 08-31-2022 12:41 AM | |
| 1 | 08-23-2022 02:49 AM | |
| 1 | 05-10-2022 05:12 AM | |
| 1 | 01-13-2022 10:03 AM |
| Online Status |
Offline
|
| Date Last Visited |
05-13-2025
03:20 AM
|