I have been trying to adapt the various examples to fit my needs but the samples are far from usefull for my scenario so hopefully someone here can help.I need to create polygons to define regions based on 3 digit zip codes (I am using the bing geocoding service). All I have been able to do so far is plot one point at a time. I am unable to figure out how to create a simple polygon by passing in multiple zip codes.My question is what is the best way to accomplish this task? Are there any USEFULL tutorials that may help me?Here's my current init function:
dojo.connect(veGeocoder, "onAddressToLocationsComplete", function (geocodeResults) {
map.graphics.clear();
var pointMeters = esri.geometry.geographicToWebMercator(geocodeResults[0].location);
var pointSymbol = new esri.symbol.SimpleMarkerSymbol().setSize(15).setColor(new dojo.Color("red"));
var polygon= new esri.geometry.Polyline(geocodeResults[0].location);
var locationGraphic = new esri.Graphic(polyline, pointSymbol);
var font = new esri.symbol.Font().setSize("17pt");
var textSymbol = new esri.symbol.TextSymbol(geocodeResults[0].displayName, font, new dojo.Color("red")).setOffset(0, 8);
map.graphics.add(locationGraphic);
map.graphics.add(new esri.Graphic(pointMeters, textSymbol));
map.setExtent(esri.geometry.geographicToWebMercator(geocodeResults[0].bestView));
});
map.addLayer(veTileLayer);
veGeocoder.addressToLocations("836"); //need to geocode multiple zip codes
Please point me in the right direction.Thanks, Justin.