+ Property::Value* imageURLValue = propertyMap.Find( Toolkit::ImageVisual::Property::URL, IMAGE_URL_NAME );
+ std::string imageUrl;
+ if( imageURLValue && imageURLValue->Get( imageUrl ) )
+ {
+ // first resolve url type to know which visual to create
+ UrlType::Type type = ResolveUrlType( imageUrl );
+ if( UrlType::N_PATCH == type )
+ {
+ visualPtr = new NPatchVisual( *( mFactoryCache.Get() ) );
+ }
+ else if( UrlType::SVG == type )
+ {
+ visualPtr = new SvgVisual( *( mFactoryCache.Get() ) );
+ }
+ else // Regular image
+ {
+ bool batchingEnabled( false );
+ Property::Value* batchingEnabledValue = propertyMap.Find( Toolkit::ImageVisual::Property::BATCHING_ENABLED, BATCHING_ENABLED );
+ if( batchingEnabledValue )
+ {
+ batchingEnabledValue->Get( batchingEnabled );
+ }
+
+ if( batchingEnabled )
+ {
+ visualPtr = new BatchImageVisual( *( mFactoryCache.Get() ) );
+ break;
+ }
+ else
+ {
+ visualPtr = new ImageVisual( *( mFactoryCache.Get() ) );
+ }
+ }
+ }
+