MOGSY Posted February 5, 2020 Share Posted February 5, 2020 Hi UniMap is not displaying title. I have used the UniMap Demo and added line Title := 'Test'; but it displays nothing. What I am not doing? procedure TMainForm.UniButton7Click(Sender: TObject); begin with UniMap1.Markers.Add do begin id:= Trunc(UniNumberEdit4.Value); Latitude:= UniFormattedNumberEdit5.Value; Longitude:= UniFormattedNumberEdit6.Value; Icon.iconUrl:= UniEdit1.Text; Title := 'Test'; Draggable:= UniCheckBox2.Checked; AddToMap; PanToMarker(8); end; end; Thank you Quote Link to comment Share on other sites More sharing options...
Sherzod Posted February 5, 2020 Share Posted February 5, 2020 3 hours ago, MOGSY said: UniMap is not displaying title. I have used the UniMap Demo and added line Title := 'Test'; but it displays nothing. What I am not doing? Hi, I will open a ticket in the support portal. At the moment, you can change the 1312 line to (uniMap.pas): 'title', FTitle, Quote Link to comment Share on other sites More sharing options...
MOGSY Posted February 5, 2020 Author Share Posted February 5, 2020 Hi I have done the change but no title is shown. Thank you. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted February 5, 2020 Share Posted February 5, 2020 3 minutes ago, MOGSY said: I have done the change but no title is shown. Sorry, then what do you mean by saying "Title"? Quote Link to comment Share on other sites More sharing options...
MOGSY Posted February 5, 2020 Author Share Posted February 5, 2020 Hi I would like to display a lable near the icon shown on the map. Thank you Quote Link to comment Share on other sites More sharing options...
Sherzod Posted February 5, 2020 Share Posted February 5, 2020 16 minutes ago, MOGSY said: I would like to display a lable near the icon shown on the map. Have you tested the map that you use on their website, is it generally supported? "Title" that you use - it implies a hint when you hover over the marker. Quote Link to comment Share on other sites More sharing options...
Hayri ASLAN Posted February 5, 2020 Share Posted February 5, 2020 Hi, We are using leaflet marker and it doesn't have a label on the marker. If you find a plugin for leaflet, we can check it. https://leafletjs.com/reference-1.6.0.html#marker Quote Link to comment Share on other sites More sharing options...
MOGSY Posted February 5, 2020 Author Share Posted February 5, 2020 thanks Quote Link to comment Share on other sites More sharing options...
MOGSY Posted February 6, 2020 Author Share Posted February 6, 2020 Hi Following code "https://jsfiddle.net/MuhammadArslan/faqok0c9/19/" gives extension to leaflet marker, these markers can allow UniMap Marker to have ID's on the marker. I would much appreciate it if one shows how to impliment it in UniGui. Thank you. leaflet_numbered_markers.css .leaflet-div-icon { background: transparent; border: none; } .leaflet-marker-icon .number{ position: relative; top: -37px; font-size: 12px; width: 25px; text-align: center; } leaflet_numbered_markers.js L.NumberedDivIcon = L.Icon.extend({ options: { // EDIT THIS TO POINT TO THE (or your own marker) iconUrl: '<%= image_path("leaflet/marker_hole.png") %>', number: '', shadowUrl: null, iconSize: new L.Point(25, 41), iconAnchor: new L.Point(13, 41), popupAnchor: new L.Point(0, -33), /* iconAnchor: (Point) popupAnchor: (Point) */ className: 'leaflet-div-icon' }, createIcon: function () { var div = document.createElement('div'); var img = this._createImg(this.options['iconUrl']); var numdiv = document.createElement('div'); numdiv.setAttribute ( "class", "number" ); numdiv.innerHTML = this.options['number'] || ''; div.appendChild ( img ); div.appendChild ( numdiv ); this._setIconStyles(div, 'icon'); return div; }, //you could change this to add a shadow like in the normal marker if you really wanted createShadow: function () { return null; } }); usage.js //Note that the text could also be letters instead of numbers if that's more appropriate var marker = new L.Marker(new L.LatLng(0, 0), { icon: new L.NumberedDivIcon({number: '1'}) }); Quote Link to comment Share on other sites More sharing options...
Hayri ASLAN Posted February 6, 2020 Share Posted February 6, 2020 do you want to use L.NumberedDivIcon or L.BeautifyIcon? Quote Link to comment Share on other sites More sharing options...
MOGSY Posted February 7, 2020 Author Share Posted February 7, 2020 L.NumberedDivIcon please Quote Link to comment Share on other sites More sharing options...
MOGSY Posted February 7, 2020 Author Share Posted February 7, 2020 Hi Aslan Did you have a chance to look at this issue? Regards Quote Link to comment Share on other sites More sharing options...
Hayri ASLAN Posted February 8, 2020 Share Posted February 8, 2020 Yes, I'm working on it. Quote Link to comment Share on other sites More sharing options...
MOGSY Posted February 8, 2020 Author Share Posted February 8, 2020 Thank you Quote Link to comment Share on other sites More sharing options...
MOGSY Posted February 17, 2020 Author Share Posted February 17, 2020 Hi Hayri Any updates for the map icons? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.