Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • G g1
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 68
    • Issues 68
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 4
    • Merge requests 4
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • cto
  • g1
  • Issues
  • #86

Closed
Open
Created Aug 06, 2018 by Anvesh Dasari@anvesh.dasari

mapviewer: Support custom markers (divIcons)

Summary

Integrate text labels on the map

Benefits

User can see text labels on the map (easy to identify).

Usage

image

Examples

(Add code samples of usage, with expected output)

var my_icon2 = L.divIcon({
          className:'current-location-icon2',
          html:'<span class="label_text text-black '+sublayer.feature.properties.Id+'">'+sublayer.feature.properties.BLOCK_NAME+'</span>',
          iconAnchor:[0,0],
          iconSize:null,
          popupAnchor:[0,0]
        })
        L.marker([sublayer.getCenter().lat, sublayer.getCenter().lng], {radius: 5,
        icon : my_icon2, color:'blue',opacity:1,fillColor: 'blue',fillOpacity:.4 ,className : "map_circle2"}).addTo(map)

Depends on the layer centroid, added text on the map.

image

Edited Aug 24, 2018 by Tejesh
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking