MOGSY Posted February 22, 2020 Share Posted February 22, 2020 I would like to use different marker on UniMap. Following code "https://jsfiddle.net/MuhammadArslan/faqok0c9/19/" gives extension to leaflet marker. 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; } }); I would much appreciate it if one shows how to impliment it in UniGui. Thank you. Quote Link to comment Share on other sites More sharing options...
Hayri ASLAN Posted February 23, 2020 Share Posted February 23, 2020 Hi, I'm working a generic way of custom icons to solve your problem. Quote Link to comment Share on other sites More sharing options...
MOGSY Posted March 6, 2020 Author Share Posted March 6, 2020 Hi Hayri I am sorry to chase, it is very helpful if you could give an indication of when is possible to have a solution. Thank you. Quote Link to comment Share on other sites More sharing options...
Hayri ASLAN Posted March 9, 2020 Share Posted March 9, 2020 Hi, You will get it with the next build. I can share unimap.pas file with you if it is urgent Quote Link to comment Share on other sites More sharing options...
MOGSY Posted March 16, 2020 Author Share Posted March 16, 2020 Hi Hayri Please share the unimap.pas. Thanking you in advance. Quote Link to comment Share on other sites More sharing options...
MOGSY Posted March 18, 2020 Author Share Posted March 18, 2020 Hi Hayri If possible please share the unimap.pas. Thank you. Quote Link to comment Share on other sites More sharing options...
Hayri ASLAN Posted March 18, 2020 Share Posted March 18, 2020 Hi, We will get new build very soon, so you will get email 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.