Select to view content in your preferred language

InfoWindows for multible point

2214
3
12-03-2014 03:58 AM
tariqjibreen
Deactivated User

how can i set infowindows for multiple point in map

appear when mouse hover the location symbol

<script type="text/javascript">
    var map;   
    require(["esri/map", "esri/geometry/Point", "esri/InfoTemplate", "esri/SpatialReference", "esri/symbols/SimpleMarkerSymbol", "esri/Graphic", "dojo/domReady!"]
        , function (Map, Point, Graphic, SpatialReference, SimpleMarkerSymbol) {
            map = new Map("mapDiv", {
                center: [2.3522219000000177,48.856614],
                zoom: 14,
                basemap: "streets"
            });
            map.on("load", function () { showLocation(); });
            function showLocation() {
                var locations = {
                    "points": [[2.352221,48.856614],[2.3529219099900188,48.846618],[2.3572519000000887,48.846654],[2.3588719000088177,48.866624]], "SpatialReference": ({ "wkid": 4326 })
                };
            var mp = new esri.geometry.Multipoint(locations);
                //var symbol = new esri.symbol.SimpleMarkerSymbol();
            var symbol = new esri.symbol.PictureMarkerSymbol('http://www.clker.com/cliparts/q/o/2/K/g/V/location-symbol-map-hi.png', 15, 25);
            var graphic = new esri.Graphic(mp, symbol);
            map.graphics.add(graphic);
          
        };
        });
</script>
0 Kudos
3 Replies
RobertScheitlin__GISP
MVP Emeritus

Tariq,

   This is not a supported configuration in the ArcGIS Viewer for Flex.

0 Kudos
tariqjibreen
Deactivated User

did you under stand my need

i have points present a projects location to be set in map i need to show the name of the project

this sample of code i used:

<script type="text/javascript">
    var map; 
    require(["esri/map", "esri/geometry/Point", "esri/InfoTemplate", "esri/SpatialReference", "esri/symbols/SimpleMarkerSymbol", "esri/Graphic", "dojo/domReady!"]
        , function (Map, Point, Graphic, SpatialReference, SimpleMarkerSymbol) {
            map = new Map("mapDiv", {
                center: [2.3522219000000177,48.856614],
                zoom: 14,
                basemap: "streets"
            });

    

            map.on("load", function () { showLocation(); });
            function showLocation() {
                var locations = {
                    "points": [[2.352221,48.856614],[2.3529219099900188,48.846618],[2.3572519000000887,48.846654],[2.3588719000088177,48.866624]], "SpatialReference": ({ "wkid": 4326 })
                };

          var mp = new esri.geometry.Multipoint(locations);
                //var symbol = new esri.symbol.SimpleMarkerSymbol();
          var symbol = new esri.symbol.PictureMarkerSymbol('http://www.clker.com/cliparts/q/o/2/K/g/V/location-symbol-map-hi.png', 15, 25);
           var graphic = new esri.Graphic(mp, symbol);
            map.graphics.add(graphic);
         
        };

        });


</script>

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Tariq,

   As I mentioned in my previous post

set infowindows for multiple point in map

This is not a supported CONFIGURATION option in the viewer. The maps infowindow is a singleton object and you can only have on displayed on the map at any given time.

Now based on the code that you have posted I see that are trying to do more than just configure the viewer, as it seems that you have the ability to add CODE. So assuming that you are a developer and have the ability to recompile the viewer (or some widgets) code, then you can do a lot more than your standard person that only has the ability to configure (edit the XML configuration files).

As a developer you can use an InfoSymbol for your points like this sample shows:

View InfoSymbols—ArcGIS API for Flex | ArcGIS for Developers

Here is the documentation link for InfoSymbol:

com.esri.ags.symbols.InfoSymbol

0 Kudos