Developer Discussions

Discuss topics with other Hexagon Geospatial Power Portfolio developers and experts to get the most out of our products.
Showing results for 
Search instead for 
Do you mean 
Reply
Highlighted
Regular Contributor
Posts: 253
Registered: ‎05-01-2016

STYLE example using DEMO_USA sample feature

[ Edited ]

Cannot get the style to be used for any MapPublisher feature.  Feature displays but only in default black line style.

 

$GP.dynamicStyles.register({
featureClassId: "USSample|States",
default: function (feature) {
return {
"style": {
"color": "#f0a",
"name": "StateBoundary",
"size": 4,
"translucency": 0.8
},
defaultStyleName: "none",
styleType: "Intergraph.WebSolutions.Core.WebClient.Platform.Style.SimpleLineStyle"

};
}
}, function () {
$GP.legend.add({
url: "http://demo.hexagongeospatial.com/wmps/mapService.svc",
definitionName: "MapPublisher",
ids: ["USSample|States"],
applicationId: "DEMO_USA",

});
});