HTMLを使用してマップを作成するのは初めてで、2つのベクトルレイヤー(場所、ポイント)をベースマップ(道路)に追加しようとしましたが、マップ上にベクトルレイヤーが表示されません。レイヤーは、ベースマップへのベクトルオーバーレイとして表示されます。レイヤーはレイヤースイッチャーに表示されているのでそこにありますが、画面には表示されていません。問題は、ベクトルレイヤーが呼び出される方法に関係していると思います。ベクトルレイヤーを表示するための解決策は何ですか。ありがとう
var map = new OpenLayers.Map("map-id");
var roads= new OpenLayers.Layer.WMS(
"roads",
"http://localhost:8080/geoserver/wms",
{layers: "roads"});
var points= new OpenLayers.Layer.Vector(
"points",
"http://localhost:8080/geoserver/wms",
{layers: "points"});
var places= new OpenLayers.Layer.Vector(
"places",
"http://localhost:8080/geoserver/wms",
{layers: "places"});
map.addLayer(roads);
map.addLayer(points);
map.addLayer(places);
map.addControl(new OpenLayers.Control.LayerSwitcher());