我需要在我的 arcgis 地图集成中正确实施 Graphic 和 GraphicLayer 的解释
{ <script src="https://js.arcgis.com/4.12/"></script>
<script>
require([
"esri/Map",
"esri/graphic",
"esri/views/MapView",
"esri/geometry/Point",
"esri/graphic",
"esri/symbols/PictureMarkerSymbol",
"esri/layers/GraphicsLayer",
"esri/dijit/BasemapToggle",
"esri/dijit/HomeButton"],
function (Map, MapView, Point, Graphic, GraphicsLayer,
PictureMarkerSymbol) {
var map = new Map({
basemap: "hybrid"
});
on(map, "load",addgraphics);
var view = new MapView({
container: "viewDiv",
map: map,
center: [72.952335,19.180190],
zoom: 15
});
var marker = new PictureMarkerSymbol('http://static.arcgis.com/images/Symbols/Shapes/BluePin1LargeB.png', 32, 32);
function addgraphics(){
var markerPoint = new Point([72.952335,19.180190]);
var storepoint = new Graphic(markerPoint,marker);
var layer = new GraphicsLayer();
layer.add(storepoint);
view.addLayer(layer);
}
});
}
我希望输出应该是带有指定纬度和经度上的标记的地图。输出是空白,我认为这是错误的。