MapQuest iOS SDK

Customize Styles

MapQuest's map styles are beautiful, informative, and provide the best experience for customers. However if you need to customize the styles, our SDK provides a way to do that.

After the style has loaded you can customize the styles by accessing a layer and then setting its property.

Red Buildings

//get the layer you want to customize
MGLFillStyleLayer *buildingLayer = (MGLFillStyleLayer *)[ layerWithIdentifier:@"building"];
if (buildingLayer) {
    buildingLayer.fillColor = [NSExpression expressionForConstantValue:[UIColor redColor]];

//get the current loaded style
guard let style = self.mapView?.style else {return}

//get the layer you want to customize
guard let buildingLayer:MGLFillStyleLayer = style.layer(withIdentifier: "building") as? MGLFillStyleLayer else {return}

buildingLayer.fillColor = NSExpression(forConstantValue: