title: How can I add names of cities and centroids in maps in R with maptools, ggplot or other packages?
body: <p>I am trying to incorporate labels of provinces, and cities with labels and dots into a South African map.I can get a map with provincial subdivisions from a spdf file, from website <a href="https://gadm.org/download_country_v3.html" rel="nofollow noreferrer">https://gadm.org/download_country_v3.html</a></p>
  <pre><code>SA1spdf &lt;- readRDS(&quot;gadm36_ZAF_1_sp.rds&quot;)
  </code></pre>
  <p>And I am trying to use the information in the slot:</p>
  <pre><code>SA1spdf@data@ADM1_EN
  </code></pre>
  <p>that contains the label of the 9 provinces
  I want to place the labels in the center of the polygons, if possible, so I got the centroids of the 9 provinces:</p>
  <pre><code>centroids_SAdf &lt;- as.data.frame(coordinates(SA1spdf))    
  </code></pre>
  <p>and change names V1 and V2 to Longitude and Latitude</p>
  <pre><code>names(centroids_SAdf) &lt;- c(&quot;Longitude&quot;, &quot;Latitude&quot;)
  </code></pre>
  <p>Also I want to add a few cities to the plot:</p>
  <pre><code>coordinates_cities &lt;- data.frame(city = c(&quot;Cape Town&quot;, &quot;Durban&quot;, &quot;Johannesburg&quot;, &quot;Port Elizabeth&quot;),lat = c(-33.930, -29.870, -26.190, -33.960 ), lon = c(18.460, 30.990, 28.040,25.590 )        
  </code></pre>
  <p>but I cannot link all these together.</p>
  <p>I can get a map with:</p>
  <pre><code>qtm(SA1spdf, fill = &quot;white&quot;)       
  </code></pre>
  <p>Using maptools and the following codes all return error messages</p>
  <pre><code>qtm(SA1spdf, fill = &quot;white&quot;) + tm_text(&quot;SA1spdf$data#ADMN1_EN&quot;)    
  
  tm_shape(SA1spdf) + tm_polygons() + tm_fill(col = &quot;white&quot;)    
  </code></pre>
  <p>I dont get a white filled map, its filled with grey colour</p>
  <p>the following codes return error messages:</p>
  <pre><code>tm_shape(SA1spdf) + tm_polygons() + tm_text(c(&quot;Eastern Cape&quot;,&quot;Free State&quot; , &quot;Gauteng&quot;,&quot;KwaZulu-Natal&quot;, &quot;Limpopo&quot;,&quot;Mpumalanga&quot;,&quot;North West&quot;,&quot;Nothern Cape&quot;,&quot;Western Cape&quot;))    
  
  ggplot(SA1spdf, aes(x = lon, y = lat), group = group) + geom_polygon(fill = &quot;white&quot;) + geom_point(data = coordinates_cities, aes(x = lat, y = lon)) + geom_text(data= coordinate_cities, aes(label = city))    
  </code></pre>