Please help…need help on how to show country names on map…

Home Forums Advice & Tutorials General Cartography Advice Please help…need help on how to show country names on map…

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #3429

    chiragmo
    Participant

    Hi, can anyone help out here, i’m trying to load the region names or at least the country names onto any map, mostly from the physical and cultural section… I see how when i click on any particular area (using geoserver as the host) i get a table that shows me regional information…I am using openlayers in my JSF application. Does anyone know how i can get the country names to show on the map?

    #4145

    Nathaniel
    Keymaster

    You’ll need to turn on the label function (differs per app, not familiar with JSF or geoserver) and use the Name column. If you want to fit the labels better, try the Abbrev column, if you care about details, use the appropriate sov, adm, geounit, geosubunit name columns at the begging of those files.

    #4146

    chiragmo
    Participant

    Thanks, you have pointed me in the right direction here. i been searching on google for examples of using the label function with openlayers and i keep coming across results that show it with a GML format rather than a WMS format which im using:

    tiled2 = new OpenLayers.Layer.WMS(

    “10m_admin_0_countries – Tiled”, “http://localhost:8080/geoserver/wms”,

    {

    layers: ‘named_polys:10m_admin_0_countries’,

    width: ‘684’,

    height: ‘330’,

    srs: ‘EPSG:4326’,

    format: “image/jpeg”,

    tiled: ‘true’,

    tilesOrigin : map.maxExtent.left + ‘,’ + map.maxExtent.bottom

    },

    {

    buffer: 0,

    displayOutsideMaxExtent: true

    }

    );

    Any more suggestions are appreciated thanks.

    #4147

    wlerner
    Participant

    See this post for some assistance:

    https://www.naturalearthdata.com/forums/topic.php?id=95

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.