显示点,点击点弹出框,弹出框里文字显示不出(attritude问题) 10C
 <!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no"/>
    <title>Simple Map</title>
     <link rel="stylesheet" href="http://192.168.1.187:8080/arcgis_js_api/library/3.9/3.9/js/esri/css/esri.css">

    <style>
      html, body, #map {
        height: 100%;
        width: 100%;
        margin: 0;
        padding: 0;
      }
      body {
        background-color: #FFF;
        overflow: hidden;
        font-family: "Trebuchet MS";
      }
    </style>
    <script type="text/javascript" src="http://192.168.1.187:8080/arcgis_js_api/library/3.9/3.9/init.js"></script>

    <script>
        var map, graphic1, pointlayer, myPoint1;

        require([
            "dojo/dom", "dojo/_base/array", "dojo/promise/all", "dojo/json",
            "esri/map", "esri/domUtils", "esri/graphic", "esri/graphicsUtils",
            "esri/geometry/Polygon", "esri/tasks/GeometryService", "esri/geometry/Point", "esri/tasks/Geoprocessor",
            "esri/tasks/FeatureSet", "esri/tasks/RelationParameters", "esri/symbols/PictureMarkerSymbol",
            "esri/Color", "esri/symbols/SimpleLineSymbol", "esri/SpatialReference",
            "esri/symbols/SimpleMarkerSymbol", "esri/symbols/SimpleFillSymbol",
            "esri/layers/GraphicsLayer", "esri/geometry/Extent", "esri/InfoTemplate", "dojo/domReady!"
        ], function (dom, array, all, JSON,
            Map, domUtils, Graphic, graphicsUtils,
            Polygon, GeometryService, Point, Geoprocessor,
            FeatureSet, RelationParameters, PictureMarkerSymbol,
            Color, SimpleLineSymbol, SpatialReference,
            SimpleMarkerSymbol, SimpleFillSymbol,
            GraphicsLayer, InfoTemplate
            ) {
            map = new Map("map", {
                basemap: "topo",
                center: [113.33, 36.33],
                zoom: 13
            });


            pointlayer = new GraphicsLayer();
            map.addLayer(pointlayer);

            var attributes = {
                "省份": "安徽",
                "录取率": 43.04,
                "未录取率": 56.96
            };
            myPoint1 = esri.geometry.geographicToWebMercator(new esri.geometry.Point
            (
            {
                "x": 113.33,
                "y": 36.33,
                "spatialReference": { "wkid": 4326 }
            }));

           var symbol = new esri.symbol.PictureMarkerSymbol('image/chaoren.png', 20, 20);

           var infoTemplate = new InfoTemplate("标题${省份}", "${省份}的录取率为${录取率},未录取率为${未录取率}");
            graphic1 = new esri.Graphic(myPoint1, symbol, attributes, infoTemplate);

            pointlayer.add(graphic1);

        });
    </script>              
  </head>

  <body>
    <div id="map"></div>
  </body>
</html>

图片说明

2个回答

请问题主,您这个是什么编程语言?

wuxichendongshen
wuxichendongshen 请问您这个问题解决了吗。小弟也遇到了,可以探讨一下么。
一年多之前 回复
caosong094542
我的安静不安静 arcgis api for javascript
大约 4 年之前 回复

你把标签的type属性加上试试

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问