i am beginner in mapserver and openlayers. i start with mapserver and now studying openlayers and see openlayers can render vectors directly.

my questions is :

  • why use mapserver inside openlayers instead of using openlayers alonely?
  • as i know openlayers render vectors in clientside. can this cause security problem about data that we won't share with users?
  • if i use mapserver inside openlayers, can i show attribute of features on user's click?

closed as too broad by PolyGeo Sep 30 '17 at 0:20

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • What do you want to do, how big is your data set? Then we can help you find out what would be the best way to proceed – johanvdw Oct 18 '14 at 7:37
  • i want creat a WebGIS site that show places over the google map base, show attributs of selected place and other process like routing. should i use mapserver ? – ahmad Oct 18 '14 at 7:42
  • Welcome to GIS SE! Something that we advertise in the Tour is that our focussed Q&A format works best with one question per question. I recommend that you edit yours to leave just the one that is most important for you to have answered first, and then research/ask the others separately. – PolyGeo Oct 18 '14 at 7:54

For example: let's say you have a 10 megabyte raster/vector file that covers a large area. If you include the file directly into OpenLayers, it will download the entire file to the browser and render whatever part of it the map needs even if it's a small area. What mapserver will do for you is always deliver to the browser a small image of exactly what needs to fit into the map viewport. If it's a high altitude view, the details will be less and the entire file will be converted to a small image. When viewed in a very zoomed in map, mapserver will deliver again a small image but of a smaller area with more detail.

the bottom line: less bandwidth and way faster for the user! you'll notice a huge difference with even a file of 1 megabyte.

  • using mapserver has less security risk because it hides the data and only gives an image version. Not using mapserver will mean you download your data to the browser which means anyone can download it. And, yes, you will be able to show an attribute either on the map or with a click if you use openlayers. good luck! – user1269942 Oct 18 '14 at 8:03

If security is not an issue but you only want to load data within the current viewport. You can also look at OpenLayers BBOX strategy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.